Travis: deploy tagged commits & edge tagging fixes
With the recent Travis changes, we prevented the deploy stage from running for tagged commits as branch=tag for tagged commits. Fix this by also running deploy for tagged commits. Furthermore, clean up .travis.yml by pulling the edge tagging logic into a separate script. A logic change is introduced to prevent git tag --force being run on set tags as this would turn annotated tags into lightweight tags.
This commit is contained in:
parent
5a3f45ed2a
commit
1b2d47cd86
20
.travis.yml
20
.travis.yml
@ -9,7 +9,7 @@ stages:
|
|||||||
- name: clean
|
- name: clean
|
||||||
if: (NOT type IN (pull_request)) AND (branch = master)
|
if: (NOT type IN (pull_request)) AND (branch = master)
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: (NOT type IN (pull_request)) AND (branch = master)
|
if: (NOT type IN (pull_request)) AND (branch = master OR tag IS present)
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: clean
|
- stage: clean
|
||||||
@ -29,11 +29,7 @@ jobs:
|
|||||||
osx_image: xcode12.2
|
osx_image: xcode12.2
|
||||||
install: ".travis/install-macos.sh"
|
install: ".travis/install-macos.sh"
|
||||||
script: ".travis/build-macos.sh release && .travis/sign-macos.sh"
|
script: ".travis/build-macos.sh release && .travis/sign-macos.sh"
|
||||||
before_deploy:
|
before_deploy: source .travis/tag-edge.sh
|
||||||
- git config --local user.name "solvespace-cd"
|
|
||||||
- git config --local user.email "no-reply@solvespace.com"
|
|
||||||
- export TRAVIS_TAG=${TRAVIS_TAG:-edge}
|
|
||||||
- git tag --force $TRAVIS_TAG
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
@ -59,11 +55,7 @@ jobs:
|
|||||||
os: windows
|
os: windows
|
||||||
install: .travis/install-windows.sh
|
install: .travis/install-windows.sh
|
||||||
script: .travis/build-windows.sh release
|
script: .travis/build-windows.sh release
|
||||||
before_deploy:
|
before_deploy: source .travis/tag-edge.sh
|
||||||
- git config --local user.name "solvespace-cd"
|
|
||||||
- git config --local user.email "no-reply@solvespace.com"
|
|
||||||
- export TRAVIS_TAG=${TRAVIS_TAG:-edge}
|
|
||||||
- git tag --force $TRAVIS_TAG
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
@ -78,11 +70,7 @@ jobs:
|
|||||||
os: windows
|
os: windows
|
||||||
install: .travis/install-windows.sh
|
install: .travis/install-windows.sh
|
||||||
script: .travis/build-windows.sh release openmp
|
script: .travis/build-windows.sh release openmp
|
||||||
before_deploy:
|
before_deploy: source .travis/tag-edge.sh
|
||||||
- git config --local user.name "solvespace-cd"
|
|
||||||
- git config --local user.email "no-reply@solvespace.com"
|
|
||||||
- export TRAVIS_TAG=${TRAVIS_TAG:-edge}
|
|
||||||
- git tag --force $TRAVIS_TAG
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
8
.travis/tag-edge.sh
Executable file
8
.travis/tag-edge.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh -xe
|
||||||
|
|
||||||
|
if [ -z "$TRAVIS_TAG" ]; then
|
||||||
|
git config --local user.name "solvespace-cd"
|
||||||
|
git config --local user.email "no-reply@solvespace.com"
|
||||||
|
export TRAVIS_TAG="edge"
|
||||||
|
git tag --force $TRAVIS_TAG
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user