1
0
plasma-containmentactions-c.../makerelease

69 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-09-06 15:25:54 +00:00
#!/bin/bash
2019-12-31 16:30:33 +00:00
if [ "$1" == "" ]; then
echo "Error: No version provided"
echo "./makerelease 0.0.1"
exit 1
fi
2015-09-06 15:25:54 +00:00
ssh -T git@github.com
if [ ! "$?" = "1" ]; then
echo "No Github ssh key loaded exiting..."
exit 1
fi
2019-12-31 16:30:33 +00:00
scp "matmoul@web.sourceforge.net:/home/frs/project/plasma-custom-desktop-menu/README.txt" /dev/null
if [ ! "$?" = "0" ]; then
echo "No Sourceforge ssh key loaded exiting..."
exit 1
fi
2015-09-06 15:25:54 +00:00
clear
2019-12-31 16:30:33 +00:00
branch=$(git rev-parse --abbrev-ref HEAD)
version=$1
2015-09-06 15:25:54 +00:00
read -p "Current branch is $branch. Continue ? (y/N)" choice
case "$choice" in
n|N|'' )
echo "cancel build !"
exit 1
;;
y|Y ) echo "Begin Build Release...";;
* )
echo "cancel build !"
exit 1
;;
esac
echo "Building version $version..."
echo ""
echo "Finalise lib script..."
sed -i /X-KDE-PluginInfo-Version/c\X-KDE-PluginInfo-Version=$version src/plasma-containmentactions-customdesktopmenu.desktop
echo "Make last commit..."
2019-12-31 16:30:33 +00:00
git commit -a -m "Version $version"
2015-09-06 15:25:54 +00:00
if [ ! "$branch" = "master" ]; then
echo "Merge branch $branch to master..."
git checkout master
git merge $branch
fi
read -p "Publish to server ? (Y/n)" choice
case "$choice" in
n|N )
exit 1
;;
esac
echo "Publish release..."
2019-12-31 16:30:33 +00:00
#Github
git push --tags
#Sourceforge :
wget https://github.com/MatMoul/plasma-containmentactions-customdesktopmenu/archive/v${version}.tar.gz
scp -r v${version}.tar.gz matmoul@web.sourceforge.net:/home/frs/project/plasma-custom-desktop-menu/releases/
rm v${version}.tar.gz
2015-09-06 15:25:54 +00:00
if [ ! "$branch" = "master" ]; then
git checkout $branch
fi