blob: ff6caa02bc2b4c1641b6ea697b7a1ca5f5eea466 (
plain)
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
31
32
33
34
35
36
37
|
#!/bin/sh
set -e
case "$1" in
*.*.*)
;;
*)
>&2 echo Need a version to release in the form 'x.y.z'
exit 1
;;
esac
prep_release() {
sed -i "s/pkgver=.*/pkgver=$1/" PKGBUILD
sed -i 's/pkgrel=.*/pkgrel=0/' PKGBUILD
sed -i "s/version=\".*\"/version=\"$1\"/" setup.py
git commit -m "Prepare v$1" -- setup.py PKGBUILD
git tag "v$1"
git push origin HEAD "v$1"
}
release() {
t="$(mktemp)"
wget --output-document="$t" "https://github.com/OJFord/iosevka-generate/archive/v$1.tar.gz"
check="$(md5sum "$t" | cut -d' ' -f1)"
sed -i "s/md5sums=.*/md5sums=('$check')/" PKGBUILD
sed -i 's/pkgrel=.*/pkgrel=1/' PKGBUILD
makepkg --printsrcinfo > .SRCINFO
git commit -m "Release v$1" -- PKGBUILD .SRCINFO
git push origin
git push aur
}
prep_release "$1"
release "$1"
|