1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-23 17:26:11 +00:00
g810-led/makerelease

58 lines
1.1 KiB
Plaintext
Raw Normal View History

2017-02-25 02:07:10 +00:00
#!/bin/bash
if [ "$1" == "" ]; then
echo "Error: No version provided"
echo "./makerelease 0.0.1"
exit 1
fi
ssh -T git@github.com
if [ ! "$?" = "1" ]; then
echo "No Github ssh key loaded exiting..."
exit 1
fi
clear
branch=$(git rev-parse --abbrev-ref HEAD)
read -p "Current branch is $branch. Continue ? (y/N)" choice
case "$choice" in
n|N|'' )
echo "Cancel !"
exit 1
;;
y|Y ) echo "Make release...";;
* )
echo "Cancel !"
exit 1
;;
esac
# Ready to update :
version=$1
sed -i "/string version = /c\\\tstring version = \"$version\";" src/helpers/help.cpp
2017-04-14 00:40:33 +00:00
IFS='.' read -ra VPART <<< "$version"
2017-04-29 15:09:27 +00:00
sed -i "/MAJOR=/cMAJOR=${VPART[0]}" makefile
sed -i "/MINOR=/cMINOR=${VPART[1]}" makefile
sed -i "/MICRO=/cMICRO=${VPART[2]}" makefile
2017-04-14 00:40:33 +00:00
git commit -m "Version $version" makefile src/*
2017-02-25 02:07:10 +00:00
git push
2017-04-14 00:40:33 +00:00
git checkout master
git merge develop
2017-04-14 01:08:04 +00:00
git push
2017-04-14 00:40:33 +00:00
2017-02-25 02:07:10 +00:00
git tag -a "v$version" -m "Version $version"
git push --tags
2017-04-14 00:40:33 +00:00
git checkout $branch
2017-02-25 02:07:10 +00:00
#wget https://github.com/MatMoul/g810-led/archive/v$version.zip
#wget https://github.com/MatMoul/g810-led/archive/v$version.tar.gz
#Publish to aur...