Sha256: 22a62d476fa645d3618ab286a6a988363fff48d1a52afa5d4aaa0133c259a4c8

Contents?: true

Size: 818 Bytes

Versions: 7

Compression:

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
simple_form-dropdown_select-0.2.1 script/release
simple_form-dropdown_select-0.2.0 script/release
simple_form-dropdown_select-0.1.4 script/release
simple_form-dropdown_select-0.1.3 script/release
simple_form-dropdown_select-0.1.2 script/release
simple_form-dropdown_select-0.1.1 script/release
simple_form-dropdown_select-0.1.0 script/release