Skip to content

Commit

Permalink
Merge branch 'master' into canary
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinmombay committed Jan 12, 2016
2 parents b8452b0 + 299b587 commit be17ec3
Show file tree
Hide file tree
Showing 9 changed files with 1,826 additions and 1,789 deletions.
5 changes: 4 additions & 1 deletion build-system/internal-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

var argv = require('minimist')(process.argv.slice(2));
var suffix = argv.type == 'canary' ? '-canary' : '';

// Used to e.g. references the ads binary from the runtime to get
// version lock.
exports.VERSION = new Date().getTime();
exports.VERSION = new Date().getTime() + suffix;
15 changes: 3 additions & 12 deletions build-system/tasks/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var git = require('gulp-git');
var gulp = require('gulp-help')(require('gulp'));
var request = BBPromise.promisify(require('request'));
var util = require('gulp-util');
var version = require('../internal-version').VERSION;

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

function getGitMetadata() {
var version = argv.version;
var versionErrMsg = 'No version option passed';

if (!version) {
util.log(util.colors.red(versionErrMsg));
throw new Error(versionErrMsg);
}

var gitMetadata = {};
return getLastGitTag()
Expand All @@ -82,9 +76,7 @@ function getGitMetadata() {
}

function submitReleaseNotes(version, changelog) {
assert(typeof version == 'number', 'version should be a number. ' + version);

var name = String(version) + suffix;
var name = String(version);
var options = {
url: 'https://api.github.com/repos/ampproject/amphtml/releases',
method: 'POST',
Expand All @@ -95,7 +87,7 @@ function submitReleaseNotes(version, changelog) {
json: true,
body: {
'tag_name': name,
'target_commitish': 'release',
'target_commitish': branch,
'name': name,
'body': changelog,
'draft': true,
Expand Down Expand Up @@ -260,6 +252,5 @@ gulp.task('changelog', 'Create github release draft', changelog, {
options: {
dryrun: ' Generate changelog but dont push it out',
type: ' Pass in "canary" to generate a canary changelog',
version: ' Label to be used for this tag release',
}
});
10 changes: 10 additions & 0 deletions build-system/tasks/presubmit-checks.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ var forbiddenTerms = {
whitelist: [
'src/amp-core-service.js',
'src/service/history-impl.js',
'src/service/resources-impl.js',
'src/service/viewer-impl.js',
'src/service/viewport-impl.js',
'src/service/vsync-impl.js',
Expand All @@ -85,17 +86,26 @@ var forbiddenTerms = {
message: privateServiceFactory,
whitelist: [
'src/amp-core-service.js',
'src/service/resources-impl.js',
'src/service/viewport-impl.js',
],
},
'installVsyncService': {
message: privateServiceFactory,
whitelist: [
'src/amp-core-service.js',
'src/service/resources-impl.js',
'src/service/viewport-impl.js',
'src/service/vsync-impl.js',
],
},
'installResourcesService': {
message: privateServiceFactory,
whitelist: [
'src/amp-core-service.js',
'src/service/resources-impl.js',
],
},
// Privacy sensitive
'cidFor': {
message: requiresReviewPrivacy,
Expand Down
2 changes: 2 additions & 0 deletions extensions/amp-iframe/0.1/test/test-amp-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {adopt} from '../../../../src/runtime';
import {createIframePromise, pollForLayout, poll}
from '../../../../testing/iframe';
import {loadPromise} from '../../../../src/event-helper';
import {viewportFor} from '../../../../src/viewport';
import * as sinon from 'sinon';

adopt(window);
Expand Down Expand Up @@ -58,6 +59,7 @@ describe('amp-iframe', () => {
if (opt_height) {
iframe.iframe.style.height = opt_height;
}
viewportFor(iframe.win).resize_();
const top = opt_top || '600px';
i.style.position = 'absolute';
i.style.top = top;
Expand Down
2 changes: 2 additions & 0 deletions src/amp-core-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import {installActionService} from './service/action-impl';
import {installHistoryService} from './service/history-impl';
import {installResourcesService} from './service/resources-impl';
import {installViewerService} from './service/viewer-impl';
import {installViewportService} from './service/viewport-impl';
import {installVsyncService} from './service/vsync-impl';
Expand All @@ -32,4 +33,5 @@ export function installCoreServices(window) {
installHistoryService(window);
installVsyncService(window);
installActionService(window);
installResourcesService(window);
}
Loading

0 comments on commit be17ec3

Please sign in to comment.