Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip alpha suffix from gem version to avoid prerelease behavior #90

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ for i in ./fluent-plugin* ; do
if [ -d "$i" ]; then
cd $i
PLUGIN_NAME=$(basename "$i")

echo "Building gems $PLUGIN_NAME in `pwd` ..."
sed -i.bak "s/0.0.0/$VERSION/g" ./$PLUGIN_NAME.gemspec
# Strip "-alpha" suffix if it exists to avoid gem prerelease behavior
GEM_VERSION=${VERSION%"-alpha"}
echo "Building gem $PLUGIN_NAME version $GEM_VERSION in `pwd` ..."
sed -i.bak "s/0.0.0/$GEM_VERSION/g" ./$PLUGIN_NAME.gemspec
rm -f ./$PLUGIN_NAME.gemspec.bak

echo "Install bundler..."
Expand All @@ -23,7 +24,7 @@ for i in ./fluent-plugin* ; do
echo "Run unit tests..."
bundle exec rake

echo "Build gem $PLUGIN_NAME $VERSION..."
echo "Build gem $PLUGIN_NAME $GEM_VERSION..."
gem build $PLUGIN_NAME
mv *.gem ../deploy/docker/gems

Expand Down