Sha256: 84396923d2ea3d75a0898cd559b4b4b4032e5ce1ede34bff5697d09a16396cd2

Contents?: true

Size: 733 Bytes

Versions: 7

Compression:

Stored size: 733 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 add-to-org-*.gem
gem build -q add-to-org.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 add-to-org-*.gem | sed 's/^add-to-org-\(.*\)\.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 add-to-org-*.gem && git tag "$tag" &&
  git push origin master && git push origin "$tag"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
add-to-org-3.0.3 script/release
add-to-org-3.0.1 script/release
add-to-org-3.0.0 script/release
add-to-org-2.2.1 script/release
add-to-org-2.2.0 script/release
add-to-org-2.1.0 script/release
add-to-org-2.0.0 script/release