summarylogtreecommitdiffstats
path: root/release.sh
blob: 0c50378662f0fb71d5e8be86321fcb9e94254355 (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
#!/bin/env bash

set -e

# Update the version
makepkg -o

version=$(grep 'pkgver=' PKGBUILD | sed 's/pkgver=//')

# Generate the .SRCINFO
makepkg --printsrcinfo > .SRCINFO

# Commit the changes
echo "Updating to version $version, commit the changes? [y/N]"

read -r response

if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
  echo "Aborted"
  exit 0
fi

git add PKGBUILD .SRCINFO
git commit -m "Release $version"

echo "Changes committed, push to the repository? [y/N]"
read -r response

if [[ ! "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
  echo "Aborted"
  exit 0
fi

git push origin master