Sha256: 602e54255779645f260f490c856f5a94579a7a2c66d64a9240602afc1c443d3d

Contents?: true

Size: 906 Bytes

Versions: 2

Compression:

Stored size: 906 Bytes

Contents

#!/bin/bash -e

GEM_NAME="sidekiq-web_custom"
if [ -z "$GITHUB_TOKEN" ]; then
  echo 'Environment variable GITHUB_TOKEN is not present'
  exit 1
fi

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


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

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

gem build ${GEM_NAME}.gemspec
FILE=$(pwd)/${PACKAGE}
echo "Finished building $FILE"

# create tag in repo
git tag -a $VERSION -m "$VERSION"
git push https://${GITHUB_TOKEN}@github.com/${GITHUB_USER}/${GEM_NAME}.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 timeoutable -c ${SHA} ${VERSION} *.gem
echo "Finished Pushing artificat to Git"

rm $

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-web_custom-0.3.0 bin/publish_git
sidekiq-web_custom-0.2.0 bin/publish_git