]> source.dussan.org Git - jquery.git/commitdiff
Build: Support jquery-release --dry-run flag
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Sat, 5 Oct 2019 16:48:27 +0000 (18:48 +0200)
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Sat, 5 Oct 2019 16:50:18 +0000 (18:50 +0200)
Without this change passing `--dry-run` to jquery-release still pushes to the
jquery-dist repository which is dangerous as one can assume `--dry-run` to be
safe from external side effects.

Close gh-4498

(cherry picked from commit d7d0b52bda74486f2351baa9d03ca4534de0d733)

build/release/dist.js

index ca7922628f1606fe02435f3c66bf2aac04a0e2d6..ef4ee7c923f2549db694a5fe8715e4fd37a14b79 100644 (file)
@@ -135,7 +135,8 @@ module.exports = function( Release, files, complete ) {
                Release.chdir( Release.dir.dist );
 
                console.log( "Pushing release to dist repo..." );
-               Release.exec( "git push " + distRemote + " master --tags",
+               Release.exec( "git push " + ( Release.isTest ? " --dry-run " : "" ) +
+                       distRemote + " master --tags",
                        "Error pushing master and tags to git repo." );
 
                // Set repo for npm publish