-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from hikimochi/feature/automate_gem_release
Feature/automate gem release
- Loading branch information
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
VERSION=$(git describe --tags | sed -e 's/^v//') | ||
git config user.email "[email protected]" | ||
git config user.name "bucky-operator" | ||
# Update version.rb | ||
sed -i -e "s/VERSION = \"[0-9]\{1,\}.[0-9]\{1,\}.[0-9]\{1,\}\"/VERSION = \"$VERSION\"/" lib/bucky/version.rb | ||
git diff | ||
git checkout master | ||
git add lib/bucky/version.rb | ||
git commit -m "Version $VERSION" | ||
# Build and release gem | ||
gem build bucky-core.gemspec | ||
gem push "bucky-core-$VERSION.gem" | ||
# Push to master | ||
git push origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mkdir ~/.gem | ||
echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials | ||
chmod 0600 /home/circleci/.gem/credentials |