Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added handy scripts and optionally used gh mongodb port if available.
- Loading branch information
1 parent
b67e902
commit 0e257fb
Showing
6 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ log | |
Gemfile.lock | ||
bin | ||
vendor | ||
.bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
require 'bundler' | ||
Bundler::GemHelper.install_tasks | ||
|
||
require 'rspec/core/rake_task' | ||
RSpec::Core::RakeTask.new | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
#/ Usage: bootstrap [bundle options] | ||
#/ | ||
#/ Bundle install the dependencies. | ||
#/ | ||
#/ Examples: | ||
#/ | ||
#/ bootstrap | ||
#/ bootstrap --local | ||
#/ | ||
|
||
set -e | ||
cd $(dirname "$0")/.. | ||
|
||
[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && { | ||
grep '^#/' <"$0"| cut -c4- | ||
exit 0 | ||
} | ||
|
||
rm -rf .bundle/{binstubs,config} | ||
bundle install --binstubs .bundle/binstubs --path .bundle --quiet "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
#/ Usage: release | ||
#/ | ||
#/ Tag the version in the repo and push the gem. | ||
#/ | ||
|
||
set -e | ||
cd $(dirname "$0")/.. | ||
|
||
[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && { | ||
grep '^#/' <"$0"| cut -c4- | ||
exit 0 | ||
} | ||
|
||
gem_name=plucky | ||
|
||
# Build a new gem archive. | ||
rm -rf $gem_name-*.gem | ||
gem build -q $gem_name.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 $gem_name-*.gem | sed "s/^$gem_name-\(.*\)\.gem$/\1/"` | ||
|
||
echo "Releasing $tag" | ||
|
||
# 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 $gem_name-*.gem && git tag "$tag" && | ||
git push origin master && git push origin "$tag" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
#/ Usage: test | ||
#/ | ||
#/ Bootstrap and run all tests. | ||
#/ | ||
#/ Examples: | ||
#/ | ||
#/ # run all tests | ||
#/ test | ||
#/ | ||
|
||
set -e | ||
cd $(dirname "$0")/.. | ||
|
||
[ "$1" = "--help" -o "$1" = "-h" -o "$1" = "help" ] && { | ||
grep '^#/' <"$0"| cut -c4- | ||
exit 0 | ||
} | ||
|
||
script/bootstrap && bundle exec rake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters