Skip to content

Commit

Permalink
NH-55892: use set -e to exit
Browse files Browse the repository at this point in the history
  • Loading branch information
xuan-cao-swi committed Jan 2, 2024
1 parent 84632c0 commit c741105
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/script/sw_build_and_push_gem.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

set -e

GEM_NAME="$1"

case $GEM_NAME in
Expand Down Expand Up @@ -34,9 +36,4 @@ gem_version=$(grep -E "VERSION\s*=\s*'[^']+'" "$found_file" | awk -F "'" '{print
gem build "opentelemetry-$GEM_NAME.gemspec"
gem push --key github --host https://rubygems.pkg.github.com/solarwinds "opentelemetry-$GEM_NAME-$gem_version.gem"

if [ $? -eq 0 ]; then
echo "Finished"
else
echo "Failed"
exit 1
fi
echo "Finished"

0 comments on commit c741105

Please sign in to comment.