Sha256: cff0230dc8ae3835aaa873ad070331d09f4eb08ba84c549d2b90344a1991e041

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

#!/bin/bash
# Usage: script/release
#
# 1. Checks if tests pass,
# 2. commits gemspec,
# 3. tags the release with the version in the gemspec,
# 4. pushes "negarmoji" gem to RubyGems.org.

set -e

case "$1" in
-h | --help )
  sed -ne '/^#/!q;s/.\{1,2\}//;1d;p' < "$0"
  exit 0
  ;;
esac

if git diff --quiet negarmoji.gemspec; then
  echo "You must bump the version in the gemspec first." >&2
  exit 1
fi

script/test

trap 'rm *.gem' EXIT

version="$(gem build negarmoji.gemspec | awk '/Version:/ { print $2 }')"
git commit negarmoji.gemspec -m "negarmoji $version"
git tag "v${version}"
git push origin HEAD "v${version}"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
negarmoji-0.1.1 script/release