File: release.sh

package info (click to toggle)
gnome-shell-extension-tiling-assistant 51-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,500 kB
  • sloc: javascript: 7,567; xml: 266; sh: 93; makefile: 40
file content (57 lines) | stat: -rwxr-xr-x 1,387 bytes parent folder | download | duplicates (2)
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
56
57
#!/bin/bash

# exit, if a command fails
set -e

# cd to repo dir
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
cd "$SCRIPT_DIR"/../

METADATA=tiling-assistant@leleat-on-github/metadata.json

# get new version nr
VERSION_LINE=$(cat $METADATA | grep \"version\":)
# split after ":" and trim the spaces
VERSION_NR=$(echo "$VERSION_LINE" | cut -d ':' -f 2 | xargs)
NEW_VERSION_NR=$((VERSION_NR + 1))

# switch to new release branch
git checkout -b "release-$NEW_VERSION_NR"

# bump up version nr in metadata.json
echo Updating metadata.json...
sed -i "s/\"version\": $VERSION_NR/\"version\": $NEW_VERSION_NR/" $METADATA
echo Metadata updated.
echo

# bump up version nr in AUR files
PKGBUILD=scripts/aur-build/PKGBUILD
echo Updating Arch\'s PKGBUILD...
sed -i "s/pkgver=$VERSION_NR/pkgver=$NEW_VERSION_NR/" $PKGBUILD
cd scripts/aur-build/
makepkg --printsrcinfo > .SRCINFO
cd ../../
echo PKGBUILD updated.
echo

# update translations
bash scripts/update-tl.sh
echo

# package zip for EGO
bash scripts/build.sh

# commit changes
echo Committing version bump...
git add $METADATA $PKGBUILD CHANGELOG.md scripts/aur-build/.SRCINFO translations/*.po translations/*.pot
git commit -m "Release: Bump version to $NEW_VERSION_NR"
echo

echo Release done.
echo

echo TODO:
echo
echo [] Push release branch and and create pull request
echo [] Create and push tag
echo [] Upload the extension to EGO