File: publish

package info (click to toggle)
mkautodoc 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: python: 289; sh: 52; makefile: 4
file content (28 lines) | stat: -rwxr-xr-x 647 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh -ex

PROJECT="mkautodoc"
VERSION=`cat ${PROJECT}/__init__.py | grep __version__ | sed "s/__version__ = //" | sed "s/'//g"`

if [ -d 'venv' ] ; then
    BIN_PATH="venv/bin/"
else
    BIN_PATH=""
fi

if ! command -v "${BIN_PATH}twine" &>/dev/null ; then
    echo "Unable to find the 'twine' command."
    echo "Install from PyPI, using '${BIN_PATH}pip install twine'."
    exit 1
fi

scripts/clean

${BIN_PATH}python setup.py sdist
${BIN_PATH}twine upload dist/*
# ${BIN_PATH}mkdocs gh-deploy

scripts/clean

echo "You probably want to also tag the version now:"
echo "git tag -a ${VERSION} -m 'version ${VERSION}'"
echo "git push --tags"