Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mkon committed Nov 3, 2022
1 parent df9e43f commit 830d6ea
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash -le

name="api_valve"

git fetch origin
current=`bin/version`
sha=`git rev-parse HEAD`

read -p "Which version? (${current}) " version
version=${version:=$current}

VERSION=$version gem build ${name}.gemspec

echo "Creating GitHub release"
link=`gh release create v${version} --target $sha --generate-notes`
echo $link
git fetch --tags origin

file="${name}-${version}.gem"
read -p "Push to rubygems? (y/n) " yn
case $yn in
y ) echo Pushing to rubygems ...;;
n ) echo Aborting.;
exit;;
* ) echo invalid response;
exit 1;;
esac

gem push $file
rm $file

open $link

0 comments on commit 830d6ea

Please sign in to comment.