소스 검색

Delete tag next once latest is published (#3973)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
Francisco 2 년 전
부모
커밋
afcdc58419
1개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 8 3
      scripts/release/workflow/publish.sh

+ 8 - 3
scripts/release/workflow/publish.sh

@@ -8,8 +8,13 @@ echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
 # Actual publish
 npm publish "$TARBALL" --tag "$TAG"
 
-if [ "$TAG" = "tmp" ]; then
-  # Remove tmp tag
+delete_tag() {
   PACKAGE_JSON_NAME="$(tar xfO "$TARBALL" package/package.json | jq -r .name)"
-  npm dist-tag rm "$PACKAGE_JSON_NAME" "$TAG"
+  npm dist-tag rm "$PACKAGE_JSON_NAME" "$1"
+}
+
+if [ "$TAG" = tmp ]; then
+  delete_tag "$TAG"
+elif ["$TAG" = latest ]; then
+  delete_tag next
 fi