Skip to content

Commit

Permalink
Just use a gh-pages branch in rtags itself.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersbakken committed Jul 16, 2015
1 parent b63264e commit 14986a4
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions bin/rtags-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@

SCRIPT_PATH=`dirname "$0"`;
SCRIPT_PATH=`eval "cd \"$SCRIPT_PATH\" && pwd"`
if [ -n "$RTAGS_RELEASES_REPO" ]; then
if [ ! -d "$RTAGS_RELEASES_REPO" ]; then
git clone [email protected]:Andersbakken/rtags-releases.git "$RTAGS_RELEASES_REPO"
fi
cd "$SCRIPT_PATH/.."
rm -f rtags.tar rtags.tar.gz
$SCRIPT_PATH/git-archive-all $RTAGS_RELEASES_REPO/rtags.tar

branch_name="$(git symbolic-ref HEAD 2>/dev/null)" || branch_name="(unnamed branch)" # detached HEAD
branch_name=${branch_name##refs/heads/}

if [ "$branch_name" == "master" ]; then
commit=`git show --oneline --no-patch`
cd "$RTAGS_RELEASES_REPO"
cd "$SCRIPT_PATH/.."
rm -f rtags.tar
$SCRIPT_PATH/git-archive-all rtags.tar
rm -rf rtags-release-repo
git new-workdir $PWD rtags-release-repo gh-pages
cd rtags-release-repo
git pull origin gh-pages
rm -f rtags.tar.gz rtags.tar.bz2 rtags.tar
mv ../rtags.tar .
gzip --keep rtags.tar
bzip2 rtags.tar
git pull
git add rtags.tar.gz rtags.tar.bz2
git commit -m "Release for $commit"
git push &
git push origin gh-pages
cd ..
rm -rf rtags-release-repo
fi

0 comments on commit 14986a4

Please sign in to comment.