From e7b31ae8c1a28cab9db8e165b3f21407c2e581e6 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 11 May 2019 10:06:23 -0700 Subject: [PATCH] Use now --target production instead of now alias Fix for this error: $ now alias --token=$NOW_TOKEN > WARN! The `now alias` command (no arguments) was deprecated in favour of `now --target production`. > Error! Couldn't find a deployment to alias. Please provide one as an argument. The command "now alias --token=$NOW_TOKEN" exited with 1. https://travis-ci.org/simonw/datasette/jobs/530597261 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7843d39a..e9944753 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,9 +29,9 @@ jobs: - export ALIAS=`echo $TRAVIS_COMMIT | cut -c 1-7` - echo "{\"name\":\"datasette-latest-$ALIAS\",\"alias\":\"latest.datasette.io\"}" > now.json - datasette publish now fixtures.db -m fixtures.json --token=$NOW_TOKEN --branch=$TRAVIS_COMMIT --version-note=$TRAVIS_COMMIT --name=datasette-latest-$ALIAS - - now alias --token=$NOW_TOKEN + - now --target production --token=$NOW_TOKEN - echo "{\"name\":\"datasette-latest-$ALIAS\",\"alias\":\"$ALIAS.datasette.io\"}" > now.json - - now alias --token=$NOW_TOKEN + - now --target production --token=$NOW_TOKEN - stage: release tagged version if: tag IS present python: 3.6 @@ -40,7 +40,7 @@ jobs: - export ALIAS=`echo $TRAVIS_COMMIT | cut -c 1-7` - export TAG=`echo $TRAVIS_TAG | sed 's/\./-/g' | sed 's/.*/v&/'` - echo "{\"name\":\"datasette-latest-$ALIAS\",\"alias\":\"$TAG.datasette.io\"}" > now.json - - now alias --token=$NOW_TOKEN + - now --target production --token=$NOW_TOKEN # Build and release to Docker Hub - docker login -u $DOCKER_USER -p $DOCKER_PASS - export REPO=datasetteproject/datasette