forked from Andersbakken/rtags
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just use a gh-pages branch in rtags itself.
- Loading branch information
1 parent
b63264e
commit 14986a4
Showing
1 changed file
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |