Skip to content

Commit 6bce775

Browse files
committed
CDN: Allow disabling via cdnPublish flag
Fixes gh-55 Closes gh-56
1 parent 579c4da commit 6bce775

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ The previous release version (used for determining what changed).
235235

236236
The version that will be set in `package.json` after the release.
237237

238+
#### cdnPublish
239+
240+
Set to `false` to prevent publishing to the jQuery CDN. Defaults to `true`.
241+
238242
#### npmPublish
239243

240244
Set to `true` to publish a release via npm. Defaults to `false`.

lib/cdn.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = function( Release ) {
2222
}
2323

2424
Release.define({
25+
cdnPublish: true,
2526
_cloneCdnRepo: function() {
2627
var local = Release.dir.base + "/codeorigin.jquery.com",
2728
remote = Release.isTest ? testRemote : realRemote;

release.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ commonTasks = [
4242
Release.confirmReview,
4343
Release._pushRelease,
4444

45-
Release._section( "publishing to jQuery CDN" ),
46-
Release._copyCdnArtifacts,
47-
Release.confirmReview,
48-
Release._pushToCdn,
45+
function( fn ) {
46+
if ( Release.cdnPublish ) {
47+
Release._section( "publishing to jQuery CDN" )();
48+
Release._walk([
49+
Release._copyCdnArtifacts,
50+
Release.confirmReview,
51+
Release._pushToCdn
52+
], fn );
53+
}
54+
},
4955

5056
function() {
5157
if ( Release.npmPublish ) {

0 commit comments

Comments
 (0)