From 73cb652130990b9de98202e002b2a63879af96a7 Mon Sep 17 00:00:00 2001 From: ankostis on tokoti Date: Sun, 13 Sep 2015 23:10:00 +0200 Subject: [PATCH] Move standalone script into /bin. --- .gitignore | 1 - bin/commit-standalone.sh | 23 ++++++++++++++++++++++ gen-standalone.py => bin/gen-standalone.py | 0 commit-standalone | 17 ---------------- 4 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 bin/commit-standalone.sh rename gen-standalone.py => bin/gen-standalone.py (100%) mode change 100755 => 100644 delete mode 100755 commit-standalone diff --git a/.gitignore b/.gitignore index 0ce140a..1284fce 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,6 @@ __pycache__/ /.coverage /htmlcov/ /.installed.cfg -/bin/ /develop-eggs/ /eggs/ /parts/ diff --git a/bin/commit-standalone.sh b/bin/commit-standalone.sh new file mode 100644 index 0000000..b2e538f --- /dev/null +++ b/bin/commit-standalone.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +## Requires this script in your PATH: +## https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir +## Invoke it with any arg to avoid committing into `standalone` branch. + +my_dir="$(dirname "$0")" +cd $my_dir/.. + +gitversion=$(git describe --tags) +rm -rf .standalone +if nwd_dump=$( git-new-workdir . .standalone standalone 2>&1 ); then + ./bin/gen-standalone.py + cp -p pypi-server-standalone.py .standalone + cd .standalone + if [ $# -lt 1 ]; then + git add . + git commit -m "add pypi-server-standalone $gitversion" + fi +else + echo "git-new-workdir: failed due to: $nwd_dump" + exit 1 +fi diff --git a/gen-standalone.py b/bin/gen-standalone.py old mode 100755 new mode 100644 similarity index 100% rename from gen-standalone.py rename to bin/gen-standalone.py diff --git a/commit-standalone b/commit-standalone deleted file mode 100755 index 9c68f70..0000000 --- a/commit-standalone +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/sh - -## Requires this script in your PATH: -## https://github.com/git/git/blob/master/contrib/workdir/git-new-workdir - -gitversion=$(git describe --tags) -rm -rf .standalone -if nwd_dump=$( git-new-workdir . .standalone standalone 2>&1 ); then - ./gen-standalone.py - cp -p pypi-server-standalone.py .standalone - cd .standalone - git add . - git ci -m "add pypi-server-standalone $gitversion" -else - echo "failed due to: $nwd_dump" - exit 1 -fi