mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-23 09:16:11 +00:00
Add make release support
This commit is contained in:
parent
7df4cc0888
commit
a43c89a2bd
46
makerelease
Executable file
46
makerelease
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
#!/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
|
||||||
|
git commit -m "Version $version" src/*
|
||||||
|
git push
|
||||||
|
|
||||||
|
git tag -a "v$version" -m "Version $version"
|
||||||
|
git push --tags
|
||||||
|
|
||||||
|
#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...
|
@ -8,11 +8,13 @@ using namespace std;
|
|||||||
|
|
||||||
namespace help {
|
namespace help {
|
||||||
|
|
||||||
|
string version = "0.0.1";
|
||||||
|
|
||||||
void usage(char *arg0) {
|
void usage(char *arg0) {
|
||||||
string cmdName = utils::getCmdName(arg0);
|
string cmdName = utils::getCmdName(arg0);
|
||||||
cout<<cmdName<<endl;
|
cout<<cmdName<<endl;
|
||||||
cout<<"--------"<<endl;
|
cout<<"--------"<<endl;
|
||||||
|
cout<<"Version : "<<version<<endl;
|
||||||
cout<<endl;
|
cout<<endl;
|
||||||
cout<<" -a {color}\t\t\t\tSet all keys color"<<endl;
|
cout<<" -a {color}\t\t\t\tSet all keys color"<<endl;
|
||||||
cout<<" -g {keygroup} {color}\t\t\tSet key group color"<<endl;
|
cout<<" -g {keygroup} {color}\t\t\tSet key group color"<<endl;
|
||||||
@ -52,7 +54,7 @@ namespace help {
|
|||||||
|
|
||||||
void keys(char *arg0) {
|
void keys(char *arg0) {
|
||||||
string cmdName = utils::getCmdName(arg0);
|
string cmdName = utils::getCmdName(arg0);
|
||||||
cout<<cmdName<<" Keys"<<endl;
|
cout<<cmdName<<" Keys"<<endl;
|
||||||
cout<<"-------------"<<endl;
|
cout<<"-------------"<<endl;
|
||||||
cout<<endl;
|
cout<<endl;
|
||||||
cout<<"Group List :"<<endl;
|
cout<<"Group List :"<<endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user