CI: Investigate conditional stages

For "master" we need to rebuild the prerelease; for "tiddlywiki-com" we need to rebuild the main release using the latest release. I want to have as much of the travis specific build logic expressed in travis.yml as possible, hence having to figure out Travis's syntax rather than doing everything in a script that tests the $TRAVIS_BRANCH environment variable...
logging-improvements
Jermolene 2019-01-05 11:59:16 +00:00
rodzic c97c3cea74
commit d58bc33df4
4 zmienionych plików z 40 dodań i 20 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -56,22 +56,6 @@ echo "<a href='./plugins/tiddlywiki/highlight/index.html'>Moved to http://tiddly
echo "<a href='./plugins/tiddlywiki/markdown/index.html'>Moved to http://tiddlywiki.com/plugins/tiddlywiki/markdown/index.html</a>" > $TW5_BUILD_OUTPUT/markdowndemo.html
echo "<a href='./plugins/tiddlywiki/tahoelafs/index.html'>Moved to http://tiddlywiki.com/plugins/tiddlywiki/tahoelafs/index.html</a>" > $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

15
bin/deploy-site.sh 100755
Wyświetl plik

@ -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)"

Wyświetl plik

@ -7,6 +7,7 @@
node ./tiddlywiki.js \
./editions/test \
--verbose \
--version \
--rendertiddler $:/core/save/all test.html text/plain \
|| exit 1