-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakerelease.sh
More file actions
executable file
·28 lines (25 loc) · 953 Bytes
/
makerelease.sh
File metadata and controls
executable file
·28 lines (25 loc) · 953 Bytes
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
#! /bin/bash
if [ $# -eq 1 ]; then
git pull --rebase &> /dev/null
git push &> /dev/null # In case there is pending work
git tag -a $1 -m "Version $1 released" &> /dev/null;
rm -Rf build/* &> /dev/null;
cd build &> /dev/null;
cmake -DVERSION_UPDATE_FROM_GIT=true .. &> /dev/null;
cd .. &> /dev/null;
git add * &> /dev/null;
git commit -a -m "Version $1 released" &> /dev/null;
# Delete tag to be readded with VERSION autogenerated file
git tag -d $1 &> /dev/null;
git tag -a $1 -m "Version $1 released" &> /dev/null;
git push &> /dev/null
git push origin $1 &> /dev/null;
# Last part is to leave again VERSION_UPDATE_FROM_GIT in false so it is not updating on each rebuild by accident
cd build &> /dev/null;
cmake -DVERSION_UPDATE_FROM_GIT=false .. &> /dev/null;
cd .. &> /dev/null;
gh release create $1 &> /dev/null
echo "Version $1 released and pushed";
else
echo "Only 1 argument is expected and should be version string!";
fi