-
-
Save sergioalvz/f5c67da192695e10e460 to your computer and use it in GitHub Desktop.
Uses Mercurial instead of Git in a gem generated by "bundle gem" but removes the spec, test and features files from the *.gemspec
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
#! /bin/sh | |
set -e | |
bundle gem $1 | |
cd $1 | |
rm -rf .git | |
mv .gitignore .hgignore | |
sed -i -e "1s/^/syntax: glob\n/" .hgignore | |
sed -i 's|git ls-files -z.*|hg manifest -q\`.split("\\n")\.reject\{ \|x\| x =~ /^(test\|spec\|features)\/ }|' $1.gemspec | |
sed -i '/spec.test_files/d' $1.gemspec | |
hg init | |
hg addremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment