Skip to content

Commit eecfc7b

Browse files
committed
Basic release script
Signed-off-by: Joffrey F <[email protected]>
1 parent 4c34be5 commit eecfc7b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ html/*
1111

1212
# Compiled Documentation
1313
site/
14+
README.rst
1415

1516
env/
1617
venv/

scripts/release.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
#
3+
# Create the official release
4+
#
5+
6+
if [ -z "$(command -v pandoc 2> /dev/null)" ]; then
7+
>&2 echo "$0 requires http://pandoc.org/"
8+
>&2 echo "Please install it and make sure it is available on your \$PATH."
9+
exit 2
10+
fi
11+
12+
VERSION=$1
13+
REPO=docker/docker-py
14+
15+
16+
if [ -z $VERSION ]; then
17+
echo "Usage: $0 VERSION [upload]"
18+
exit 1
19+
fi
20+
21+
echo "##> Tagging the release as $VERSION"
22+
git tag $VERSION || exit 1
23+
if [[ $2 == 'upload' ]]; then
24+
echo "##> Pushing tag to github"
25+
git push $GITHUB_REPO $VERSION || exit 1
26+
fi
27+
28+
29+
pandoc -f markdown -t rst README.md -o README.rst || exit 1
30+
python setup.py sdist bdist_wheel || exit 1
31+
if [[ $2 == 'upload' ]]; then
32+
echo "##> Uploading sdist to pypi"
33+
python setup.py upload
34+
fi

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[bdist_wheel]
2+
3+
universal = 1

0 commit comments

Comments
 (0)