#/bin/bash # for pushed-code round-trip only, # for locally-commited-only round-trip, see REPO/__root__/run-sdist # # pre-release package how-to (requires bash, coreutils, curl, tar # and assumes clufter_version is correctly set to correspond $GITHASH below): : ${GITHASH:=$Format:%h$} GHREPO=jnpkrn/clufter pushd "$(LC=C \ curl -qL -o >(tar xzf -) "https://github.com/${GHREPO}/tarball/${GITHASH}" \ 2>&1 \ | sed -e '/< Content-Disposition:/!d' \ -e 's|.*filename=\([^-]\+-[^-]\+-\)\(v[^g]\+\)\?g\([0-9a-z]\+\)\.tar\.gz|\1\3|' \ | tr -d '\r\n' )/__root__" python2 setup.py sdist -d "${OLDPWD}" popd echo "New source tarball created: $(ls -1t | head -n1)"