From f062ed9ce3729fb3ba3f43573136d2a0e0c6d209 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 24 Jan 2020 11:21:30 -0500 Subject: [PATCH] Fix CI deploy --- .travis.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c29b71f..291c059 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,9 @@ if: type != push OR branch = master OR branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ stages: - name: pretest + if: NOT branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ - name: test + if: NOT branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ - name: deploy if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ - name: publish @@ -86,14 +88,16 @@ jobs: - stage: deploy name: Deploy osx_image: xcode11 + env: HOMEBREW_NO_INSTALL_CLEANUP=1 + install: brew install mxcl/made/swift-sh script: + - set -e - export VERSION=$(echo $TRAVIS_TAG | cut -c 8-) - git tag "$VERSION" - - git remote set-url origin "https://$GITHUB_TOKEN@github.com/mxcl/homebrew-made.git" + - git remote set-url origin "https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG.git" + - git fetch --unshallow origin - git push origin "$VERSION" - - curl -O https://raw.githubusercontent.com/mxcl/ops/master/deploy - - chmod u+x deploy - - ./deploy publish-release + - swift sh <(curl https://raw.githubusercontent.com/mxcl/ops/master/deploy) publish-release - git push origin :$TRAVIS_TAG - stage: publish