blob: 5b2e9838e2dce0e48506e4c165e348ad20da6c33 (
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
38
39
40
41
42
43
44
45
46
47
|
#!/bin/bash
VERSION="$1"
if [ -z "$VERSION" ]
then
echo Please provide version number as first argument to the script
exit 1
fi
echo == Cleaning up things...
rm -rf pkg
rm -rf src
rm joshi-*.tar.gz
rm joshi-*.zst
echo == Changing pkgver in PKGBUILD...
sed -i "s/^pkgver=.*$/pkgver=$VERSION/" PKGBUILD
echo == Downloading source to compute SHA256...
makepkg --verifysource --skipchecksums
SHA256=$(sha256sum joshi-${VERSION}.tar.gz | awk '{print $1}')
echo SHA256=$SHA256
echo == Changing sha256sums in PKGBUILD...
sed -i "s/^sha256sums=.*$/sha256sums=\(\"${SHA256}\"\)/" PKGBUILD
echo == Checking package build...
if ! makepkg -frs
then
echo
echo "PACKAGE BUILD FAILED !!!"
echo
exit 1
fi
echo == Generating .SRCINFO file...
makepkg --printsrcinfo > .SRCINFO
echo == Creating release commit...
git add .
git commit -m "release $VERSION"
echo
echo The release commit is ready.
echo Please check that it is correct, then run 'git push' when ready
echo
|