From d5a25c9a964e678171a557889b62661abfb6f8ef Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 7 Jan 2019 18:40:22 +0000 Subject: [PATCH] CI: Start building properly --- .travis.yml | 21 ++++++++++++++++++--- bin/deploy-site.sh | 15 --------------- bin/travis-pre-build.sh | 5 ++++- 3 files changed, 22 insertions(+), 19 deletions(-) delete mode 100755 bin/deploy-site.sh diff --git a/.travis.yml b/.travis.yml index e22911bed..e58b83bb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,17 +3,32 @@ language: node_js stages: - name: test - - name: build + - name: build-prerelease if: branch = "master" + - name: build-tiddlywiki-com + if: branch = "tiddlywiki-com" jobs: include: - stage: test script: ./bin/test.sh - - stage: build + - stage: build-prerelease script: - ./bin/travis-pre-build.sh - - export TW5_BUILD_DETAILS="Built from branch '$TRAVIS_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date '%H:%M:%S +%Y-%m-%d')" + - export TW5_BUILD_VERSION=v5.1.20-prerelease # Eeek need to automate this + - export TW5_BUILD_DETAILS="Prerelease built from branch '$TRAVIS_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date '%H:%M:%S +%Y-%m-%d')" - export TW5_BUILD_TIDDLYWIKI='./node_modules/tiddlywiki/tiddlywiki.js' + - export TW5_BUILD_MAIN_EDITION='./editions/prerelease' + - export TW5_BUILD_OUTPUT='./output/prerelease' + - ./bin/build-site.sh + - ./bin/travis-push.sh + - stage: build-tiddlywiki-com + script: + - ./bin/travis-pre-build.sh + - export TW5_BUILD_VERSION=v5.1.19 # Eeek need to automate this + - export TW5_BUILD_DETAILS="Built from branch '$TRAVIS_BRANCH' at commit $(git rev-parse HEAD) of $(git remote get-url origin) at $(date '%H:%M:%S +%Y-%m-%d')" + - export TW5_BUILD_TIDDLYWIKI='./tiddlywiki.js' + - export TW5_BUILD_MAIN_EDITION='./editions/tw5.com' + - export TW5_BUILD_OUTPUT='./output' - ./bin/build-site.sh - ./bin/travis-push.sh diff --git a/bin/deploy-site.sh b/bin/deploy-site.sh deleted file mode 100755 index 51c205646..000000000 --- a/bin/deploy-site.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# Deploy the output folder to github - -# pushd ../jermolene.github.io - -# git add --all || exit 1 - -# git commit -m "Updates" || exit 1 - -# git push origin || exit 1 - -# popd - -echo "(Placeholdeer feploying to GitHub)" \ No newline at end of file diff --git a/bin/travis-pre-build.sh b/bin/travis-pre-build.sh index a67cd7990..f92e3029f 100755 --- a/bin/travis-pre-build.sh +++ b/bin/travis-pre-build.sh @@ -1,7 +1,10 @@ #!/bin/bash -# Pull existing GitHub pages content +# Install latest current release from npm +# (we need to force because otherwise npm will refuse to install a module of the same name) npm --force install tiddlywiki || exit 1 +# Pull existing GitHub pages content + git clone --depth=1 --branch=master "https://github.com/Jermolene/Testing2019.git" output