Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force upgrade sticky ad to 1.0 #9042

Merged
merged 4 commits into from
May 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/amp-sticky-ad/0.1/test/test-amp-sticky-ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import '../amp-sticky-ad';
import '../../../amp-ad/0.1/amp-ad';
import {poll} from '../../../../testing/iframe';

describes.realWin('amp-sticky-ad 0.1 version', {
describes.realWin.skip('amp-sticky-ad 0.1 version', {
win: { /* window spec */
location: '...',
historyOff: false,
Expand Down Expand Up @@ -284,7 +284,7 @@ describes.realWin('amp-sticky-ad 0.1 version', {
});


describes.realWin('amp-sticky-ad 0.1 with real ad child', {
describes.realWin.skip('amp-sticky-ad 0.1 with real ad child', {
win: { /* window spec */
location: '...',
historyOff: false,
Expand Down
9 changes: 9 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,15 @@ function buildExtension(name, version, hasCss, options, opt_extraGlobs) {
options = options || {};
options.extraGlobs = opt_extraGlobs;
var path = 'extensions/' + name + '/' + version;
if (name == 'amp-sticky-ad' && version == '0.1') {
// Special case for amp-sticky-ad force upgrade from v0.1 to v1.0
// to provide better UX. (related issue #6169).
// To deprecate 0.1, replace the build path so that amp-sticky-ad-0.1.js
// is built from extensions/amp-sticky-ad/1.0/amp-sticky-ad.js
// NOTE: The upgrade happens here to provide backward compatibility
// to existing pages with amp-sticky-ad 0.1 script.
path = 'extensions/' + name + '/1.0';
}
var jsPath = path + '/' + name + '.js';
var jsTestPath = path + '/test/' + 'test-' + name + '.js';
if (argv.files && options.bundleOnlyIfListedInFiles) {
Expand Down
4 changes: 4 additions & 0 deletions testing/describes.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ function describeEnv(factory) {
return templateFunc(name, spec, fn, describe./*OK*/only);
};

mainFunc.skip = function(name, variants, fn) {
return templateFunc(name, variants, fn, describe.skip);
};

return mainFunc;
}

Expand Down