Sha256: ef0fc734bfcf798eba858596b6064f32dee12c92953f7648025a8aa398995d43

Contents?: true

Size: 870 Bytes

Versions: 75

Compression:

Stored size: 870 Bytes

Contents

#!/bin/sh
#/ Usage: release
#/
#/ Tag the version in the repo and push the gem.
#/

set -e
cd $(dirname "$0")/..

[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && {
    grep '^#/' <"$0"| cut -c4-
    exit 0
}

gem_name=crack

# Build a new gem archive.
rm -rf $gem_name-*.gem
gem build -q $gem_name.gemspec

# Make sure we're on the master branch.
(git branch | grep -q '* master') || {
  echo "Only release from the master branch."
  exit 1
}

# Figure out what version we're releasing.
tag=v`ls $gem_name-*.gem | sed "s/^$gem_name-\(.*\)\.gem$/\1/"`

echo "Releasing $tag"

# Make sure we haven't released this version before.
git fetch -t origin

(git tag -l | grep -q "$tag") && {
  echo "Whoops, there's already a '${tag}' tag."
  exit 1
}

# Tag it and bag it.
gem push $gem_name-*.gem && git tag "$tag" &&
  git push origin master && git push origin "$tag"

Version data entries

75 entries across 69 versions & 12 rubygems

Version Path
cloudsmith-api-0.53.3 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.53.1 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.52.121 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.52.92 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.52.79 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.52.5 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.52.0 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.51.93 vendor/bundle/ruby/2.3.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.51.38 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.51.37 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.51.34 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.51.22 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/script/release
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.49.118 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.49.98 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.49.94 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.49.21 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release
cloudsmith-api-0.49.15 vendor/bundle/ruby/2.6.0/gems/crack-0.4.3/script/release