소스 검색

chore: allow specifying release tag

ktsn 5 년 전
부모
커밋
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