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

Fix script publish gem #106

Merged
merged 2 commits into from
Feb 19, 2018
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion RUBYGEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Then run the following [Docker](https://docs.docker.com/engine/installation/) co

```bash
docker build -t auth0-publish-rubygem .
docker run --rm -e RUBYGEMS_EMAIL=$RUBYGEMS_EMAIL -e RUBYGEMS_PASSWORD=$RUBYGEMS_PASSWORD -it auth0-publish-rubygem /bin/sh publish_rubygem.sh
docker run --rm -e RUBYGEMS_EMAIL="$RUBYGEMS_EMAIL" -e RUBYGEMS_PASSWORD="$RUBYGEMS_PASSWORD" -it auth0-publish-rubygem /bin/sh publish_rubygem.sh
```
16 changes: 7 additions & 9 deletions publish_rubygem.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/usr/bin/env bash

# Create file with credentials for rubygems.org
touch credentials.txt
echo $RUBYGEMS_EMAIL > credentials.txt
echo $RUBYGEMS_PASSWORD >> credentials.txt
# build the gem
# Create directory for rubygems credentials
mkdir /root/.gem
# Get API key from rubygems.org
curl -u "$RUBYGEMS_EMAIL":"$RUBYGEMS_PASSWORD" https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
# Build Gem
gem build auth0.gemspec
# publish the gem on rubygems.org
gem push auth0-*.gem < credentials.txt
# Delete credentials file
rm credentials.txt
# Publish Gem
gem push auth0-*.gem