Sha256: a4dcbafb3688e027bddc4d26ea36fe4fd2907cb7510a976a1c1cd885889f9bf8

Contents?: true

Size: 786 Bytes

Versions: 5

Compression:

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bunto-seo-tag-5.0.0 script/release
bunto-seo-tag-4.0.0 script/release
bunto-seo-tag-3.0.0 script/release
bunto-seo-tag-2.0.0 script/release
bunto-seo-tag-1.0.0 script/release