File: release.sh

package info (click to toggle)
nsscache 0.49-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 19,664 kB
  • sloc: python: 8,661; xml: 584; sh: 304; makefile: 19
file content (21 lines) | stat: -rwxr-xr-x 684 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
#!/bin/bash -e

if [ -z $1 ]; then
	CURRENT_VERSION=$(PYTHONPATH=. python3 -c 'import nss_cache; print(nss_cache.__version__)')
    a=( ${CURRENT_VERSION//./ } )
    (( a[${#a[@]}-1] += 1 ))
    NEW_VERSION=$(IFS=.; echo "${a[*]}")
else
    NEW_VERSION=$1
fi

echo Minting $NEW_VERSION
DATE=$(date +%Y-%m-%d)

sed -i "1c\.TH NSSCACHE 1 $DATE \"nsscache $NEW_VERSION\" \"User Commands\"" nsscache.1
sed -i "1c\.TH NSSCACHE.CONF 5 $DATE \"nsscache $NEW_VERSION\" \"File formats\"" nsscache.conf.5
sed -i "s/__version__ = '.*'/__version__ = '$NEW_VERSION'/" nss_cache/__init__.py


git commit -a -m "Mint version $NEW_VERSION"
git tag -s "version/$NEW_VERSION" -m "version/$NEW_VERSION"