blob: 6995691206a29bbd5b9f4f2cb80c8f335136a5ef (
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
48
49
50
51
52
53
54
55
|
#!/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 -f killer-vpn-*.tar.gz
rm -f killer-vpn-*.zst
echo == Changing pkgver in PKGBUILD...
sed -i "s/^pkgver=.*$/pkgver=$VERSION/" PKGBUILD
echo == Downloading source to compute SHA256...
touch install.sh # Need to do this in case it doesn't exist
makepkg --verifysource --skipchecksums
SHA256=$(sha256sum killer-vpn-${VERSION}.tar.gz | awk '{print $1}')
echo SHA256=$SHA256
echo == Changing sha256sums in PKGBUILD...
sed -i "s/^sha256sums=.*$/sha256sums=\(\"${SHA256}\"\)/" PKGBUILD
echo == Updating PKGBUILD and install.sh...
tar xvf killer-vpn-${VERSION}.tar.gz
mv killer-vpn/arch/install.sh .
#rm -rf killer-vpn-${VERSION} # GitHub adds version to tar's internal folder
rm -rf killer-vpn # Codeberg doesn't
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
|