forked from KreativJos/csharpextensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcb4e82
commit c070335
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |