File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Use the first argument as version or 'v3-prerelease' if not available
6+ version=${1:- ' v3-prerelease' }
7+
8+ # Ensure git stage is clear
9+ if [[ $( git status --porcelain) ]]; then
10+ echo " Your git status is not clean." ;
11+ exit 1;
12+ else
13+ echo " Git status is clean. Proceeding with the script." ;
14+ fi
15+
16+ # Run your commands
17+ rm .changeset/pre.json
18+
19+ echo " Running: pnpm exec changeset version --snapshot $version "
20+ pnpm exec changeset version --snapshot $version
21+
22+ echo " Running: pnpm run build --filter \" @trigger.dev/*\" --filter \" trigger.dev\" "
23+ pnpm run build --filter " @trigger.dev/*" --filter " trigger.dev"
24+
25+ echo " Going to run: pnpm exec changeset publish --no-git-tag --snapshot --tag $version "
26+ read -p " Do you wish to continue? (Y/n): " prompt
27+ if [[ $prompt =~ [yY](es)* ]]; then
28+ pnpm exec changeset publish --no-git-tag --snapshot --tag $version
29+ else
30+ echo " Publish command aborted by the user."
31+ exit 1;
32+ fi
33+
34+ # If there were no errors, clear the git stage
35+ echo " Commands ran successfully. Clearing the git stage."
36+ git reset --hard HEAD
You can’t perform that action at this time.
0 commit comments