Travis: add clean edge script
This commit is contained in:
parent
6ff8db93e8
commit
953c472897
@ -6,10 +6,17 @@ git:
|
|||||||
if: tag != edge
|
if: tag != edge
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- name: clean
|
||||||
|
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)
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
|
- stage: clean
|
||||||
|
name: Remove Github Release
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
script: .travis/remove-edge.sh
|
||||||
- stage: test
|
- stage: test
|
||||||
name: macOS
|
name: macOS
|
||||||
os: osx
|
os: osx
|
||||||
|
23
.travis/remove-edge.sh
Executable file
23
.travis/remove-edge.sh
Executable file
@ -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
Block a user