Created
February 12, 2012 13:51
-
-
Save schmir/1808657 to your computer and use it in GitHub Desktop.
helper script for gevent git repository
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 | |
# helper script for gevent .git repository | |
# setup private ignore file and a custom script to build a versioned sdist | |
test -e gevent/__init__.py -a -e .git || exit "run this inside the gevent git repository" | |
cat >.git/make-sdist <<'EOF' | |
#! /bin/sh -e | |
test -e gevent/__init__.py -a -e .git || exit "run this inside the gevent git repository" | |
T=dist/gevent-tmp | |
rm -rf $T | |
git clone . $T | |
cd $T | |
ln -s .. dist | |
version=$(git describe --tags) | |
echo "building $version" | |
sed -i -e "s/__version__ =.*/__version__ = \"$version\"/" gevent/__init__.py setup.py | |
python2 setup.py sdist recompress | |
EOF | |
chmod 755 .git/make-sdist | |
echo "created .git/make-sdist. run .git/make-sdist to create a source distribution" | |
cat >.git/info/exclude <<'EOF' | |
*~ | |
*.pyc | |
*.pyo | |
*.orig | |
.*.swp | |
dist | |
gevent.egg-info | |
build | |
gevent/core.pyx | |
doc/_build | |
doc/changelog.rst | |
MANIFEST | |
/.ropeproject/ | |
*.so | |
gevent/gevent.*.c | |
gevent/gevent.*.h | |
__pycache__/ | |
EOF | |
echo "installed .git/info/exclude" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment