Sha256: 0718f8f860e427baf50b150d1f982ca7825f6db59b13fa6ed534ec880e7b19f4

Contents?: true

Size: 730 Bytes

Versions: 6

Compression:

Stored size: 730 Bytes

Contents

#!/bin/sh

set -e

# Ensure we're in the project root

cd $(dirname "$0")/..

# Build the new gem

rm -rf cloudcannon-jekyll-*.gem
gem build -q cloudcannon-jekyll.gemspec

# Ensure 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 cloudcannon-jekyll-*.gem | sed 's/^cloudcannon-jekyll-\(.*\)\.gem$/\1/'`

# Ensure 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
}

# Push tag and upload new gem

gem push cloudcannon-jekyll-*.gem && git tag "$tag" &&
	git push origin master && git push origin "$tag"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cloudcannon-jekyll-0.0.8 script/release
cloudcannon-jekyll-0.0.7 script/release
cloudcannon-jekyll-0.0.6 script/release
cloudcannon-jekyll-1.0.0 script/release
cloudcannon-jekyll-0.0.5 script/release
cloudcannon-jekyll-0.0.4 script/release