Sha256: 9fa8a5454c7960fc8a86cb661408b07aca285574e8e4ed3e0331701919dbc1b3

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

#!/bin/bash -e

if [ -z "$GEMFURY_TOKEN" ]; then
  echo 'Environment variable GEMFURY_TOKEN is not present'
  exit 1
fi


VERSION=$(bin/rails runner 'Sidekiq::WebCustom.get_version')
PACKAGE=sidekiq-web_custom-${VERSION}.gem

if [ $(git tag -l "$VERSION") ]; then
  echo "Pre existing version $VERSION, not tagging."
  echo "Pre existing version $VERSION, not pushing to gemfury."
  exit 0
fi

# Build and publish to Gemfury
gem build sidekiq-web_custom.gemspec
FILE=$(pwd)/${PACKAGE}
echo "Finished building $FILE"

# push to gemfury
curl --fail -F package=@${FILE} https://${GEMFURY_TOKEN}@push.fury.io/${GEMFURY_USER}/
echo "Finished Pushing to Gemfury"

# create tag in repo
git tag -a $VERSION -m "$VERSION"
git push https://${GITHUB_TOKEN}@github.com/${GITHUB_USER}/sidekiq-web_custom.git $VERSION
echo "Finished Tagging to git"


# send artifacts to git
SHA=$(git rev-parse HEAD)
./$GHRLOCATION -soft -t ${GITHUB_TOKEN} -u ${GITHUB_USER} -r sidekiq-web_custom -c ${SHA} ${VERSION} *.gem

echo "Finished Pushing artificat to Git"

# start fresh
rm sidekiq-web_custom.gemspec

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sidekiq-web_custom-0.6.0 bin/publish
sidekiq-web_custom-0.5.0 bin/publish
sidekiq-web_custom-0.4.1 bin/publish
sidekiq-web_custom-0.4.0 bin/publish
sidekiq-web_custom-0.3.1 bin/publish
sidekiq-web_custom-0.3.0 bin/publish
sidekiq-web_custom-0.2.0 bin/publish