Alias deploy to latest.datasette.io AND commithash.datasette.io

This commit is contained in:
Simon Willison 2018-06-17 13:24:38 -07:00
commit b454d61e9f
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52

View file

@ -1,8 +1,8 @@
language: python
python:
- 3.5
- 3.6
- 3.5
# Executed for 3.5 AND 3.5 as the first "test" stage:
script:
@ -16,5 +16,9 @@ jobs:
- pip install .
- npm install -g now
- python tests/fixtures.py fixtures.db fixtures.json
- datasette publish now fixtures.db -m fixtures.json --name datasette-latest --token=$NOW_TOKEN
- echo '{"name":"datasette-latest","alias":"latest.datasette.io"}' > now.json
- datasette publish now fixtures.db -m fixtures.json --token=$NOW_TOKEN --branch=$TRAVIS_COMMIT --version-note=$TRAVIS_COMMIT
- now alias
- echo "{\"name\":\"datasette-latest\",\"alias\":\"$TRAVIS_COMMIT.datasette.io\"}" > now.json
- now alias
on: travis-deploy-now