summaryrefslogtreecommitdiffstats
path: root/misc/run-sdist-per-commit
blob: 16c6f055511b31fbf35f35d6b9f519bd5b675ec3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#/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)"