From 35bff9bfaa135e761ea495a826a759b5cf822820 Mon Sep 17 00:00:00 2001 From: Alexis Luque Date: Fri, 16 Feb 2018 15:16:31 -0300 Subject: [PATCH 1/2] Update publish_rubygem.sh --- publish_rubygem.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/publish_rubygem.sh b/publish_rubygem.sh index fd245a2b..31f28fee 100644 --- a/publish_rubygem.sh +++ b/publish_rubygem.sh @@ -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 From 74e1e013b8bcf82523ec405f6e9644234eed3905 Mon Sep 17 00:00:00 2001 From: Alexis Luque Date: Fri, 16 Feb 2018 15:17:13 -0300 Subject: [PATCH 2/2] Update RUBYGEM.md --- RUBYGEM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RUBYGEM.md b/RUBYGEM.md index ba16387c..eff6e27c 100644 --- a/RUBYGEM.md +++ b/RUBYGEM.md @@ -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 ```