File: create-release

package info (click to toggle)
utidylib 0.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 216 kB
  • sloc: python: 428; makefile: 148; sh: 41
file content (30 lines) | stat: -rwxr-xr-x 718 bytes parent folder | download
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
29
30
#!/bin/sh

set -e

if [ "x$1" = "x--help" -o "x$1" = "x-h" ] ; then
    echo "Usage: ./scripts/create-release [--tag]"
    exit 1
fi

if ! git diff --exit-code --quiet ; then
    echo "There are not committed changes!"
    exit 1
fi

# Grab version
version=`python -c 'import tidy; print(tidy.__version__)'`

# What are we going to build?
if [ "x$1" = "x--tag" ] ; then
    git tag -s v$version -m "Version $version"
fi

# Create tarball
./setup.py sdist --formats bztar,gztar,zip

# Optionally upload
if [ "x$1" = "x--tag" ] ; then
    twine upload --sign --identity 63CB1DF1EF12CF2AC0EE5A329C27B31342B7511D dist/uTidylib-$version.tar.gz
    scp dist/uTidylib-$version.* web:/home/nijel/srv/dl.cihar.com/utidylib/
fi