Sha256: f24fbbde019d56286ea4f5156db107291cbae721d90c10293d4ffc6d0ec8a9e6

Contents?: true

Size: 728 Bytes

Versions: 6

Compression:

Stored size: 728 Bytes

Contents

#!/bin/sh
# Tag and push a release.

set -e

# Make sure we're in the project root.

cd $(dirname "$0")/..

# Build a new gem archive.

rm -rf humans_rb-*.gem
gem build -q humans_rb.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 humans_rb-*.gem | sed 's/^humans_rb-\(.*\)\.gem$/\1/'`

# 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 humans_rb-*.gem && git tag "$tag" &&
  git push origin master && git push origin "$tag"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
humans_rb-0.0.6 script/release
humans_rb-0.0.5 script/release
humans_rb-0.0.4 script/release
humans_rb-0.0.3 script/release
humans_rb-0.0.2 script/release
humans_rb-0.0.1 script/release