1
0
Эх сурвалжийг харах

chore: allow specifying release tag

ktsn 5 жил өмнө
parent
commit
71776ba683
1 өөрчлөгдсөн 7 нэмэгдсэн , 4 устгасан
  1. 7 4
      build/release.sh

+ 7 - 4
build/release.sh

@@ -1,8 +1,11 @@
 set -e
-echo "Enter release version: "
-read VERSION
 
-read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
+read -p "Enter release version: " VERSION
+read -p "Enter release tag (latest): " TAG
+
+TAG=${TAG:-latest}
+
+read -p "Releasing $VERSION for the tag '$TAG' - are you sure? (y/n)" -n 1 -r
 echo    # (optional) move to a new line
 if [[ $REPLY =~ ^[Yy]$ ]]
 then
@@ -22,5 +25,5 @@ then
   # publish
   git push origin refs/tags/v$VERSION
   git push
-  npm publish
+  npm publish --tag $TAG
 fi