diff --git a/.travis.yml b/.travis.yml index a7deb77ad..4abf5eb4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,26 @@ language: node_js - "node" -install: - - npm --force install tiddlywiki -script: - - ./bin/build-release.sh + +stages: + - install + if: branch = "master" + - test + - build + if: branch = "master" + - pre-deploy + if: branch = "master" + - deploy + if: branch = "master" + +jobs: + include: + - stage: install + script: npm --force install tiddlywiki + - stage: test + script: ./bin/test.sh + - stage: build + script: ./bin/build-site.sh + - stage: pre-deploy + script: + - stage: deploy + script: ./bin/deploy-site.sh diff --git a/bin/build-release.sh b/bin/build-site.sh similarity index 97% rename from bin/build-release.sh rename to bin/build-site.sh index 288f8eec4..ba02fa168 100755 --- a/bin/build-release.sh +++ b/bin/build-site.sh @@ -56,22 +56,6 @@ echo "Moved to http://tiddly echo "Moved to http://tiddlywiki.com/plugins/tiddlywiki/markdown/index.html" > $TW5_BUILD_OUTPUT/markdowndemo.html echo "Moved to http://tiddlywiki.com/plugins/tiddlywiki/tahoelafs/index.html" > $TW5_BUILD_OUTPUT/tahoelafs.html -###################################################### -# -# Tests -# -###################################################### - -# /test.html Wiki for running tests in browser -# Also runs the serverside tests -node $TW5_BUILD_TIDDLYWIKI \ - ../TiddlyWiki5/editions/test \ - --verbose \ - --version \ - --output $TW5_BUILD_OUTPUT \ - --rendertiddler $:/core/save/all test.html text/plain \ - || exit 1 - # ###################################################### # # # # Core distribution diff --git a/bin/deploy-site.sh b/bin/deploy-site.sh new file mode 100755 index 000000000..51c205646 --- /dev/null +++ b/bin/deploy-site.sh @@ -0,0 +1,15 @@ +#!/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/test.sh b/bin/test.sh index 38bb7fbb8..2de66b1fd 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -7,6 +7,7 @@ node ./tiddlywiki.js \ ./editions/test \ --verbose \ + --version \ --rendertiddler $:/core/save/all test.html text/plain \ || exit 1