Travis: add clean edge script
parent
6ff8db93e8
commit
953c472897
|
@ -6,10 +6,17 @@ git:
|
|||
if: tag != edge
|
||||
stages:
|
||||
- test
|
||||
- name: clean
|
||||
if: (NOT type IN (pull_request)) AND (branch = master)
|
||||
- name: deploy
|
||||
if: (NOT type IN (pull_request)) AND (branch = master)
|
||||
jobs:
|
||||
include:
|
||||
- stage: clean
|
||||
name: Remove Github Release
|
||||
os: linux
|
||||
dist: bionic
|
||||
script: .travis/remove-edge.sh
|
||||
- stage: test
|
||||
name: macOS
|
||||
os: osx
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh -xe
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get -y install jq
|
||||
|
||||
old_release=$(curl \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/solvespace/solvespace/releases/tags/edge \
|
||||
| jq -r ".url")
|
||||
|
||||
if [ -z "$old_release" ]; then
|
||||
curl \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
"$old_release"
|
||||
fi
|
||||
|
||||
curl \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
https://api.github.com/repos/solvespace/solvespace/git/refs/tags/edge
|
Loading…
Reference in New Issue