Sha256: 2cd98cfc81225dd18b8e6579150ca47d5ef71270b00bf27042f422b38332dfea

Contents?: true

Size: 738 Bytes

Versions: 5

Compression:

Stored size: 738 Bytes

Contents

#!/bin/sh
LIB_NAME="snipp"
if [ $# -ne 2 ]
then
	echo "Usage: $0 {version} {target}"
	exit 1
fi
GEMSPEC="${LIB_NAME}.gemspec"
PKG_FILE="${LIB_NAME}-$1.gem"

echo "[RUN] gem install"
bundle install
echo "[RUN] rake"
bundle exec rake

if [ $? -eq 1 ]
then
	exit 1
fi
echo "[RUN] gem build ${GEMSPEC}"
gem build ${GEMSPEC}
if [ $? -eq 1 ]
then
	exit 1
fi

echo "[RUN] mv ${PKG_FILE} pkg/"
mv ${PKG_FILE} ./pkg

case "$2" in
	"install")
		echo "[RUN] rake install pkg/${PKG_FILE}"
		bundle exec rake install --trace
	;;
	"deploy")
		echo "[RUN] gem push pkg/${PKG_FILE}"
		gem push pkg/${PKG_FILE}

		echo "[RUN] git tag -a version-$1"
		git tag -a version-$1 -m ""
		git push --tags
	;;
	*)
		echo "FATAL: invalid target"
		exit 1
	;;
esac

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
snipp-0.1.4 build_gem.sh
snipp-0.1.3 build_gem.sh
snipp-0.1.2 build_gem.sh
snipp-0.1.1 build_gem.sh
snipp-0.1.0 build_gem.sh