Skip to content

Commit

Permalink
add scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Mar 22, 2014
1 parent f891607 commit 163007d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
3 changes: 3 additions & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

bundle exec rake test
2 changes: 2 additions & 0 deletions script/console
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/sh

bundle exec pry -r './lib/word-to-markdown.rb'
38 changes: 38 additions & 0 deletions script/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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 word-to-markdown-*.gem
gem build -q word-to-markdown.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 word-to-markdown-*.gem | sed 's/^word-to-markdown-\(.*\)\.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 word-to-markdown-*.gem && git tag "$tag" &&
git push origin master && git push origin "$tag"
2 changes: 1 addition & 1 deletion word-to-markdown.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Gem::Specification.new do |s|
s.version = "0.0.1"
s.authors = ["Ben Balter"]
s.email = "[email protected]"
s.homepage = "https://github.com/benbalter/doc-to-markdown"
s.homepage = "https://github.com/benbalter/word-to-markdown"
s.licenses = ["MIT"]
s.files = [ "lib/word-to-markdown.rb" ]
s.add_dependency("reverse_markdown","~> 0.4.7")
Expand Down

0 comments on commit 163007d

Please sign in to comment.