From 839d8af63902475362047233b1db66ee1c9b4d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Tue, 2 Aug 2016 18:27:44 +0200 Subject: [PATCH] Add --atomic flag to git push This flag makes sure that either both the branch and the tag gets pushed, or (in the case of an error) none of them gets pushed. --- xyz | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xyz b/xyz index 407d9b4..71ea2f3 100755 --- a/xyz +++ b/xyz @@ -159,6 +159,6 @@ inc component.json run "git commit --message '$message'" run "git tag --annotate '$tag' --message '$message'" -run "git push '$repo' 'refs/heads/$branch' 'refs/tags/$tag'" +run "git push --atomic '$repo' 'refs/heads/$branch' 'refs/tags/$tag'" run "npm publish"