File: release.sh

package info (click to toggle)
python-openqa-client 4.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 180 kB
  • sloc: python: 661; sh: 23; makefile: 3
file content (28 lines) | stat: -rwxr-xr-x 796 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
#!/bin/bash

baddeps=""
# check deps
python3 -m build.__init__ || baddeps="python3-build"
rpm -q twine || baddeps="${baddeps} twine"
if [ -n "${baddeps}" ]; then
    echo "${baddeps} must be installed!"
    exit 1
fi

if [ "$#" != "1" ]; then
    echo "Must pass release version!"
    exit 1
fi

version=$1
name=openqa_client
sed -i -e "s,version=\".*\",version=\"${version}\", g" setup.py
sed -i -e "s,version = \".*\",version = \"${version}\", g" pyproject.toml
sed -i -e "s,__version__ = \".*\",__version__ = \"${version}\", g" src/${name}/__init__.py
git add setup.py pyproject.toml src/${name}/__init__.py
git commit -s -m "Release ${version}"
git push
git tag -a -m "Release ${version}" ${version}
git push origin ${version}
python3 -m build .
twine upload -r pypi dist/${name}-${version}*