Fix CI deploy

This commit is contained in:
Max Howell
2020-01-24 11:21:30 -05:00
parent f1f7ee33b1
commit f062ed9ce3

View File

@@ -3,7 +3,9 @@ if: type != push OR branch = master OR branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
stages: stages:
- name: pretest - name: pretest
if: NOT branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
- name: test - name: test
if: NOT branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
- name: deploy - name: deploy
if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
- name: publish - name: publish
@@ -86,14 +88,16 @@ jobs:
- stage: deploy - stage: deploy
name: Deploy name: Deploy
osx_image: xcode11 osx_image: xcode11
env: HOMEBREW_NO_INSTALL_CLEANUP=1
install: brew install mxcl/made/swift-sh
script: script:
- set -e
- export VERSION=$(echo $TRAVIS_TAG | cut -c 8-) - export VERSION=$(echo $TRAVIS_TAG | cut -c 8-)
- git tag "$VERSION" - 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" - git push origin "$VERSION"
- curl -O https://raw.githubusercontent.com/mxcl/ops/master/deploy - swift sh <(curl https://raw.githubusercontent.com/mxcl/ops/master/deploy) publish-release
- chmod u+x deploy
- ./deploy publish-release
- git push origin :$TRAVIS_TAG - git push origin :$TRAVIS_TAG
- stage: publish - stage: publish