We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51a0fbd commit 8c00921Copy full SHA for 8c00921
build/bumpAndPublish.sh
@@ -3,10 +3,20 @@ npm run bump-version
3
result=$?
4
5
if [ $result -eq 0 ]; then
6
- npx vsce publish $f --pat $1 --noVerify
7
- exit
+ output="$(npx vsce publish $f --pat $1 --noVerify 2>&1)"
+ publishResult=$?
8
+ echo $output
9
+ if [ $publishResult -eq 0 ]; then
10
+ exit
11
+ elif [[ $output =~ "already exists" ]]; then
12
+ echo "Publish failed but expected. Skipping publishing same version."
13
14
+ else
15
+ echo "Error publishing"
16
+ exit 1
17
+ fi;
18
elif [ $result -eq 1 ]; then
- echo "Skipping publishing new version"
19
+ echo "Skipping publishing same version"
20
exit
21
else
22
echo "Error. Exited with $result"
0 commit comments