2017-12-21 12:08:21 +07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-12-22 01:55:02 +07:00
|
|
|
# cd $HOME
|
2017-12-21 12:08:21 +07:00
|
|
|
git config --global user.email $GHEMAIL
|
|
|
|
git config --global user.name $GHUSERNAME
|
|
|
|
|
|
|
|
# add, commit and push files
|
|
|
|
git clone https://github.com/Anuken/Mindustry.wiki.git
|
|
|
|
cd Mindustry.wiki
|
|
|
|
|
2018-01-04 02:11:44 +07:00
|
|
|
DESKFILE=$TRAVIS_BUILD_NUMBER"-desktop-bleeding-edge.jar"
|
2017-12-22 01:55:02 +07:00
|
|
|
cp ../desktop/build/libs/desktop-release.jar $DESKFILE
|
2017-12-21 12:08:21 +07:00
|
|
|
|
2018-02-03 02:56:44 +07:00
|
|
|
FILE1="Bleeding-Edge-Build-"$TRAVIS_BUILD_NUMBER".md"
|
2017-12-21 12:08:21 +07:00
|
|
|
|
|
|
|
if [ ! -e $FILE1 ]; then
|
|
|
|
touch $FILE1
|
|
|
|
fi
|
|
|
|
|
2018-02-03 03:24:45 +07:00
|
|
|
echo "### Commit #"$TRAVIS_COMMIT" Desktop JAR download: [Link]("$DESKFILE")" >> $FILE1
|
2017-12-21 12:08:21 +07:00
|
|
|
|
|
|
|
git add $FILE1
|
2017-12-22 03:25:31 +07:00
|
|
|
git add $DESKFILE
|
2017-12-21 12:08:21 +07:00
|
|
|
git commit -m "Added a new bleeding edge build"
|
2018-01-04 02:50:38 +07:00
|
|
|
|
|
|
|
# now remove old build
|
|
|
|
|
|
|
|
OLD_TRAVIS_BUILD_NUMBER=`expr $TRAVIS_BUILD_NUMBER - 7`
|
|
|
|
OLD_DESKFILE=$OLD_TRAVIS_BUILD_BUMBER"-desktop-bleeding-edge.jar"
|
2018-01-23 05:29:23 +07:00
|
|
|
OLD_FILE1="Bleeding-Edge-Build-"$OLD_TRAVIS_BUILD_NUMBER".md"
|
2018-01-04 02:50:38 +07:00
|
|
|
|
2018-01-23 05:29:23 +07:00
|
|
|
if [ -e $OLD_FILE1 ]; then
|
2018-01-04 02:50:38 +07:00
|
|
|
rm -f $OLD_FILE1
|
|
|
|
rm -f $OLD_DESKFILE
|
|
|
|
git add $OLD_FILE1
|
|
|
|
git add $OLD_DESKFILE
|
|
|
|
fi
|
|
|
|
|
2017-12-22 01:55:02 +07:00
|
|
|
git push https://$GHUSERNAME:$GHPASSWORD@github.com/Anuken/Mindustry.wiki.git --all
|