Forked from jirikuncar/gist:654560a5e4f5498ffa4f
Last active
August 29, 2015 14:26
-
-
Save lnielsen/d41e5a5df78913d47b51 to your computer and use it in GitHub Desktop.
Module separation
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
git clone https://github.com/inveniosoftware/invenio-$PACKAGE | |
cd invenio-$PACKAGE/ | |
git remote add invenio https://github.com/inveniosoftware/invenio | |
git fetch invenio | |
git checkout -b master invenio/master | |
git log --follow invenio/modules/$PACKAGE/models.py | |
git log --stat --follow invenio/modules/$PACKAGE/models.py | |
git checkout -b rename fe01274ee7afa8025ae5bfea88eb231dd299637a | |
git checkout -b pre-rename rename~ | |
git filter-branch -f --subdirectory-filter modules/$LEGACY/ | |
mkdir .git/info | |
echo `git rev-parse rename` `git rev-parse pre-rename` > .git/info/grafts | |
git checkout master | |
git filter-branch -f --subdirectory-filter invenio/modules/$PACKAGE/ master ^pre-rename | |
# use Cookie Cutter to generate new module `invenio-$PACKAGE` | |
mkdir invenio_$PACKAGE | |
git mv *.py invenio_$PACKAGE/ | |
git mv templates invenio_$PACKAGE/ | |
git mv upgrades invenio_$PACKAGE/ | |
git mv static invenio_$PACKAGE/ | |
git mv testsuite/ tests | |
git rm -rf tests/__init__.py | |
git log --format='- %an <%ae>' | sort -u >> AUTHORS.rst | |
git add AUTHORS.rst | |
check-manifest -c | |
for t in `git tag -l`; do git tag -d $t; done | |
git add MANIFEST.in | |
git commit -a -m 'global: initial package separation' -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment