#!/bin/bash -e BASE="sidekiq-web_custom" if [ -z "$GEM_HOST_API_KEY" ]; then echo 'Environment variable GEM_HOST_API_KEY is not present' exit 1 fi VERSION=$(bin/rails runner 'Sidekiq::WebCustom.get_version') PACKAGE=${BASE}-${VERSION}.gem # Build Gem gem build ${BASE}.gemspec FILE=$(pwd)/${PACKAGE} echo "Finished building $FILE" # push to Ruby Gems gem push ${FILE} echo "Finished pushing to Gemfury" rm ${FILE}