Skip to content

Commit

Permalink
add bin/release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancyq committed Sep 8, 2024
1 parent eafa7e9 commit 72b81f5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

VERSION=$1

if [ -z "$VERSION" ]; then
echo "Usage: $0 <version>"
exit 1
fi

printf "# frozen_string_literal: true\n\nmodule Rodiff\n VERSION = \"$VERSION\"\nend\n" > ./lib/rodiff/version.rb
bundle
git add Gemfile.lock lib/rodiff/version.rb
git commit -m "Bump version for $VERSION"
git push
git tag v$VERSION
git push --tags

rake package
for gem in pkg/rodiff-$VERSION*.gem ; do
gem push "$gem" --host https://rubygems.org
rm "$gem"
done

0 comments on commit 72b81f5

Please sign in to comment.