File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ # Tag and push a release.
3+
4+ set -e
5+
6+ # Make sure we're in the project root.
7+
8+ cd $( dirname " $0 " ) /..
9+
10+ # Make sure the darn thing works
11+
12+ bundle update
13+
14+ # Build a new gem archive.
15+
16+ rm -rf jekyll-theme-tactile-* .gem
17+ gem build -q jekyll-theme-tactile.gemspec
18+
19+ # Make sure we're on the master branch.
20+
21+ (git branch | grep -q ' master' ) || {
22+ echo " Only release from the master branch."
23+ exit 1
24+ }
25+
26+ # Figure out what version we're releasing.
27+
28+ tag=v` ls jekyll-theme-tactile-* .gem | sed ' s/^jekyll-theme-tactile-\(.*\)\.gem$/\1/' `
29+
30+ # Make sure we haven't released this version before.
31+
32+ git fetch -t origin
33+
34+ (git tag -l | grep -q " $tag " ) && {
35+ echo " Whoops, there's already a '${tag} ' tag."
36+ exit 1
37+ }
38+
39+ # Tag it and bag it.
40+
41+ gem push jekyll-theme-tactile-* .gem && git tag " $tag " &&
42+ git push origin master && git push origin " $tag "
You can’t perform that action at this time.
0 commit comments