summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2016-03-22 17:56:30 -0700
committerJoffrey F <joffrey@docker.com>2016-03-22 17:56:30 -0700
commiteecfc7b7f7293f668968503c1bffe6cdb7f4c83f (patch)
treec27f918afcb503a7f7b9fca404e246dfcd5c20f1
parent4c34be5d4ab8a5a017950712e9c96b56d78d1c58 (diff)
downloaddocker-py-eecfc7b7f7293f668968503c1bffe6cdb7f4c83f.tar.gz
Basic release script959-release-script
Signed-off-by: Joffrey F <joffrey@docker.com>
-rw-r--r--.gitignore1
-rwxr-xr-xscripts/release.sh34
-rw-r--r--setup.cfg3
3 files changed, 38 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 9980377..34ccd38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@ html/*
# Compiled Documentation
site/
+README.rst
env/
venv/
diff --git a/scripts/release.sh b/scripts/release.sh
new file mode 100755
index 0000000..817f74d
--- /dev/null
+++ b/scripts/release.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# Create the official release
+#
+
+if [ -z "$(command -v pandoc 2> /dev/null)" ]; then
+ >&2 echo "$0 requires http://pandoc.org/"
+ >&2 echo "Please install it and make sure it is available on your \$PATH."
+ exit 2
+fi
+
+VERSION=$1
+REPO=docker/docker-py
+GITHUB_REPO=git@github.com:$REPO
+
+if [ -z $VERSION ]; then
+ echo "Usage: $0 VERSION [upload]"
+ exit 1
+fi
+
+echo "##> Tagging the release as $VERSION"
+git tag $VERSION || exit 1
+if [[ $2 == 'upload' ]]; then
+ echo "##> Pushing tag to github"
+ git push $GITHUB_REPO $VERSION || exit 1
+fi
+
+
+pandoc -f markdown -t rst README.md -o README.rst || exit 1
+python setup.py sdist bdist_wheel || exit 1
+if [[ $2 == 'upload' ]]; then
+ echo "##> Uploading sdist to pypi"
+ python setup.py upload
+fi
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..ccc93cf
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,3 @@
+[bdist_wheel]
+
+universal = 1