File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed
Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -252,7 +252,9 @@ Or to downgrade `latest-rc` tag to a previous version.
252252
253253## How to cleanup dev tags
254254
255- Execute the npm script ` npm run devops:cleanup-tag -- <dev-tag> `
256- Ex: ` npm run devops:cleanup-tag -- dev-101 `
255+ Execute the npm script ` npm run devops:cleanup:dev -tag -- <dev-tag> <otp> ` to clean up a single dev tag.
256+ Ex: ` npm run devops:cleanup:dev -tag -- dev-101 123456 `
257257
258- It will remove the dev tag from npm registry and deprecate all versions related to this dev tag.
258+ To clean up ** all** dev tags at once: ` npm run devops:cleanup:dev-tag:all -- <otp> `
259+
260+ Both will deprecate all versions related to the dev tag(s) and remove the dist-tag(s) from the npm registry.
Original file line number Diff line number Diff line change 7676 "compile" : " wireit" ,
7777 "dependencies:upgrade" : " npx npm-check-updates -u ; npm update ; npm audit fix" ,
7878 "devops:cleanup:dev-tag" : " ./tooling/devops-cleanup.sh" ,
79+ "devops:cleanup:dev-tag:all" : " ./tooling/devops-cleanup-all.sh" ,
7980 "devops:move-tag" : " ./tooling/devops-movetag.sh" ,
8081 "lint" : " wireit" ,
8182 "lint:dependencies" : " wireit" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ OTP=$1
4+ PACKAGE=" sf-git-merge-driver"
5+
6+ DEV_TAGS=$( npm dist-tag ls " ${PACKAGE} " | grep -oE ' ^dev-[0-9]+' )
7+
8+ if [ -z " ${DEV_TAGS} " ]; then
9+ echo " No dev tags found"
10+ exit 0
11+ fi
12+
13+ VERSIONS_JSON=$( npm view " ${PACKAGE} " versions --json)
14+
15+ for DEV_TAG in ${DEV_TAGS} ; do
16+ echo " Cleaning up ${DEV_TAG} ..."
17+ echo " ${VERSIONS_JSON} " | jq -r ' .[]' | grep " \\ -${DEV_TAG} \\ ." | xargs -I {} npm deprecate " ${PACKAGE} @{}" " Deprecated dev version" --otp " ${OTP} "
18+ npm dist-tag rm " ${PACKAGE} " " ${DEV_TAG} " --otp " ${OTP} "
19+ done
You can’t perform that action at this time.
0 commit comments