aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatMoul <matmoul@gmail.com>2015-08-20 21:01:57 +0200
committerMatMoul <matmoul@gmail.com>2015-08-20 21:01:57 +0200
commitbf606c032bb32df01f2fbcfa74fd53b70bb7fda1 (patch)
treec936a84ccff5067fa62a546cb17e17980580a73e
parenta8eade78304b2c4aa4665022c905070c610b3b50 (diff)
downloadhyperfi-bf606c032bb32df01f2fbcfa74fd53b70bb7fda1.tar.lz
hyperfi-bf606c032bb32df01f2fbcfa74fd53b70bb7fda1.tar.xz
hyperfi-bf606c032bb32df01f2fbcfa74fd53b70bb7fda1.zip
Update
-rwxr-xr-x[-rw-r--r--]makerelease38
1 files changed, 35 insertions, 3 deletions
diff --git a/makerelease b/makerelease
index 576d1cf..70684eb 100644..100755
--- a/makerelease
+++ b/makerelease
@@ -1,5 +1,12 @@
#!/bin/bash
+ssh -T git@github.com
+if [ ! "$?" = "1" ]; then
+ echo "No ssh key loaded exiting..."
+ exit 1
+fi
+
+
prjname=archfi
version=$(date +"%Y.%m.%d.%H.%M.%S")
branch=$(git rev-parse --abbrev-ref HEAD)
@@ -35,10 +42,35 @@ sed -i '1s/^/Current Version :\n/' CHANGELOG
echo "Make last commit..."
git commit -m "New Release : $version" *
-echo "Merge branch $branch to master..."
+if [ ! "$branch" = ""]; then
+ echo "Merge branch $branch to master..."
+ git checkout master
+ git merge $branch
+
+ read -p "Delete branch $branch ? (Y/n)" choice
+ case "$choice" in
+ y|Y|'' )
+ git branch -D $branch
+ ;;
+ esac
+fi
+
+echo "Create index.html"
+fle=$(cat archfi)
+git checkout gh-pages
+echo "$fle" > index.html
+chmod 640 index.html
+git commit -m "New Release : $version" index.html
git checkout master
-git merge $branch
-#git push
+
+
+read -p "Publish to server ? (Y/n)" choice
+case "$choice" in
+ y|Y|'' )
+ #git push -u origin master
+ git push
+ ;;
+esac