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 51b9906 commit c3e4c64
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"

cd "instrumentation/$GEM_NAME" || exit 1
Expand All @@ -17,9 +19,4 @@ gem_version=$(grep -E "VERSION\s*=\s*'[^']+'" "$found_file" | awk -F "'" '{print
gem build "opentelemetry-instrumentation-$GEM_NAME.gemspec"
gem push --key github --host https://rubygems.pkg.github.com/solarwinds "opentelemetry-instrumentation-$GEM_NAME-$gem_version.gem"

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

0 comments on commit c3e4c64

Please sign in to comment.