diff --git a/.travis.yml b/.travis.yml index 608d5c8..1c2a658 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,11 @@ cache: script: - npm run lint - npm test + - bin/deploy_prod_backend.sh --dry-run --target $GRAPHCOOL_TARGET deploy: - provider: script skip_cleanup: true - script: bin/deploy_prod_backend.sh + script: bin/deploy_prod_backend.sh --actually-deploy-graphcool on: branch: master diff --git a/bin/deploy_prod_backend.sh b/bin/deploy_prod_backend.sh index 6230a4d..7dad2df 100755 --- a/bin/deploy_prod_backend.sh +++ b/bin/deploy_prod_backend.sh @@ -79,8 +79,17 @@ platformToken: >- $GRAPHCOOL_TOKEN EOF -if [ "$GRAPHCOOL_FORCE_DEPLOY" == true ]; then - npm run deployProdBackend -- --force +additional_flags='--dry-run' + +if [ "$1" == "--actually-deploy-graphcool" ]; then + green "Deploying the graphcool backend" + additional_flags='' else - npm run deployProdBackend + yellow "Running a dry run of the graphcool backend deploy" fi + +if [ "$GRAPHCOOL_FORCE_DEPLOY" == true ]; then + npm run deployProdBackend -- --force $additional_flags +else + npm run deployProdBackend -- $additional_flags +fi \ No newline at end of file