-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdeploy_github.sh
More file actions
executable file
·33 lines (25 loc) · 903 Bytes
/
deploy_github.sh
File metadata and controls
executable file
·33 lines (25 loc) · 903 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
29
30
31
# Deploy a github release for Panorama
# ensure git output is english
export LANG=en_US.UTF-8
git stage Gemfile.lock
git commit -m "Next version" Gemfile.lock
git push
# Check if repository is up to date
git status | grep "nothing to commit, working tree clean"
if [ $? -ne 0 ]; then
echo "Github repository is not up to date! Commit and push first."
git status
exit 1
fi
echo "Update Github command line tool"
brew upgrade gh
# Panorama-Version
PANORAMA_VERSION=`cat config/application.rb | grep "VERSION =" | cut -d " " -f5 | sed "s/'//g"`
echo "Panorama version = $PANORAMA_VERSION"
echo "Create release"
gh release create v$PANORAMA_VERSION './Panorama.jar#Panorama.jar: Download and start with "java -jar Panorama.jar"' --notes "Continuous development" --title "Release $PANORAMA_VERSION"
if [ $? -eq 0 ]; then
echo "Release created"
else
echo "Returncode != 0 for gh command"
fi