mirror of
https://github.com/netbootxyz/netboot.xyz.git
synced 2025-08-07 06:16:58 +02:00
12 lines
398 B
Bash
Executable File
12 lines
398 B
Bash
Executable File
#! /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
|