Skip to content

Commit be17ec3

Browse files
committed
Merge branch 'master' into canary
2 parents b8452b0 + 299b587 commit be17ec3

File tree

9 files changed

+1826
-1789
lines changed

9 files changed

+1826
-1789
lines changed

build-system/internal-version.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
var argv = require('minimist')(process.argv.slice(2));
18+
var suffix = argv.type == 'canary' ? '-canary' : '';
19+
1720
// Used to e.g. references the ads binary from the runtime to get
1821
// version lock.
19-
exports.VERSION = new Date().getTime();
22+
exports.VERSION = new Date().getTime() + suffix;

build-system/tasks/changelog.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var git = require('gulp-git');
3131
var gulp = require('gulp-help')(require('gulp'));
3232
var request = BBPromise.promisify(require('request'));
3333
var util = require('gulp-util');
34+
var version = require('../internal-version').VERSION;
3435

3536
var GITHUB_ACCESS_TOKEN = process.env.GITHUB_ACCESS_TOKEN;
3637
var exec = BBPromise.promisify(child_process.exec);
@@ -56,13 +57,6 @@ function changelog() {
5657
}
5758

5859
function getGitMetadata() {
59-
var version = argv.version;
60-
var versionErrMsg = 'No version option passed';
61-
62-
if (!version) {
63-
util.log(util.colors.red(versionErrMsg));
64-
throw new Error(versionErrMsg);
65-
}
6660

6761
var gitMetadata = {};
6862
return getLastGitTag()
@@ -82,9 +76,7 @@ function getGitMetadata() {
8276
}
8377

8478
function submitReleaseNotes(version, changelog) {
85-
assert(typeof version == 'number', 'version should be a number. ' + version);
86-
87-
var name = String(version) + suffix;
79+
var name = String(version);
8880
var options = {
8981
url: 'https://api.github.com/repos/ampproject/amphtml/releases',
9082
method: 'POST',
@@ -95,7 +87,7 @@ function submitReleaseNotes(version, changelog) {
9587
json: true,
9688
body: {
9789
'tag_name': name,
98-
'target_commitish': 'release',
90+
'target_commitish': branch,
9991
'name': name,
10092
'body': changelog,
10193
'draft': true,
@@ -260,6 +252,5 @@ gulp.task('changelog', 'Create github release draft', changelog, {
260252
options: {
261253
dryrun: ' Generate changelog but dont push it out',
262254
type: ' Pass in "canary" to generate a canary changelog',
263-
version: ' Label to be used for this tag release',
264255
}
265256
});

build-system/tasks/presubmit-checks.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ var forbiddenTerms = {
7676
whitelist: [
7777
'src/amp-core-service.js',
7878
'src/service/history-impl.js',
79+
'src/service/resources-impl.js',
7980
'src/service/viewer-impl.js',
8081
'src/service/viewport-impl.js',
8182
'src/service/vsync-impl.js',
@@ -85,17 +86,26 @@ var forbiddenTerms = {
8586
message: privateServiceFactory,
8687
whitelist: [
8788
'src/amp-core-service.js',
89+
'src/service/resources-impl.js',
8890
'src/service/viewport-impl.js',
8991
],
9092
},
9193
'installVsyncService': {
9294
message: privateServiceFactory,
9395
whitelist: [
9496
'src/amp-core-service.js',
97+
'src/service/resources-impl.js',
9598
'src/service/viewport-impl.js',
9699
'src/service/vsync-impl.js',
97100
],
98101
},
102+
'installResourcesService': {
103+
message: privateServiceFactory,
104+
whitelist: [
105+
'src/amp-core-service.js',
106+
'src/service/resources-impl.js',
107+
],
108+
},
99109
// Privacy sensitive
100110
'cidFor': {
101111
message: requiresReviewPrivacy,

extensions/amp-iframe/0.1/test/test-amp-iframe.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {adopt} from '../../../../src/runtime';
2020
import {createIframePromise, pollForLayout, poll}
2121
from '../../../../testing/iframe';
2222
import {loadPromise} from '../../../../src/event-helper';
23+
import {viewportFor} from '../../../../src/viewport';
2324
import * as sinon from 'sinon';
2425

2526
adopt(window);
@@ -58,6 +59,7 @@ describe('amp-iframe', () => {
5859
if (opt_height) {
5960
iframe.iframe.style.height = opt_height;
6061
}
62+
viewportFor(iframe.win).resize_();
6163
const top = opt_top || '600px';
6264
i.style.position = 'absolute';
6365
i.style.top = top;

src/amp-core-service.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import {installActionService} from './service/action-impl';
1818
import {installHistoryService} from './service/history-impl';
19+
import {installResourcesService} from './service/resources-impl';
1920
import {installViewerService} from './service/viewer-impl';
2021
import {installViewportService} from './service/viewport-impl';
2122
import {installVsyncService} from './service/vsync-impl';
@@ -32,4 +33,5 @@ export function installCoreServices(window) {
3233
installHistoryService(window);
3334
installVsyncService(window);
3435
installActionService(window);
36+
installResourcesService(window);
3537
}

0 commit comments

Comments
 (0)