mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2026-01-23 02:34:26 +00:00
adding random string to RC if the release allready exists so we can roll more than one if needed
This commit is contained in:
parent
2d4da18ffb
commit
120c41ded5
2 changed files with 12 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ jobs:
|
|||
script: skip
|
||||
before_deploy:
|
||||
- export RELEASE_TAG=$(cat version.txt)-RC
|
||||
- git tag ${RELEASE_TAG}
|
||||
- ./script/tag
|
||||
deploy:
|
||||
- provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
|
|
|
|||
11
script/tag
Executable file
11
script/tag
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
# if tag exists append random string to it
|
||||
CODE=$(curl -s -o /dev/null -I -w "%{http_code}" https://api.github.com/repos/netbootxyz/netboot.xyz/releases/tags/"${RELEASE_TAG}")
|
||||
echo ${CODE}
|
||||
if [ "${CODE}" == "404" ]; then
|
||||
git tag ${RELEASE_TAG}
|
||||
elif [ "${CODE}" == "200" ]; then
|
||||
RAND=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 3 | head -n 1)
|
||||
git tag ${RELEASE_TAG}${RAND}
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue