Skip to content

Commit

Permalink
[Fix] Fixed publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
KreativJos committed Aug 6, 2020
1 parent dcb4e82 commit c070335
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/bash

npm run test | grep 'fail' &> /dev/null
test_output="$(npm run test)"

if [$? == 0]; then
if [[ $test_output == *"failing"* ]]; then
echo "Failing test found, cannot publish. Test output:"
echo "$test_output"
else
vsce package
sed -e 's/"publisher": "kreativ-software"/"publisher": "jsw"/g' ./package.json >./package.json.temp
mv package.json package.json.2.temp
mv package.json.temp package.json
ovsx publish -p $(cat ovsx.key)
rm package.json
mv package.json.2.temp package.json
else
echo 'Test failed, cannot publish'
fi

0 comments on commit c070335

Please sign in to comment.