owner and repository pre-calculated
added OWNER and REPOSITORY var using github env vars and if not available fallback option is available.
This commit is contained in:
parent
50197bbeef
commit
f7e1c11ea7
1 changed files with 6 additions and 2 deletions
|
@ -27,10 +27,14 @@ do
|
|||
EXIT_STATUS=$?
|
||||
echo "exit: $EXIT_STATUS"
|
||||
|
||||
OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
|
||||
REPO_NAME=${GITHUB_REPOSITORY:(${#OWNER}+1)}
|
||||
REPOSITORY="${REPO_NAME:-"vscodium"}"
|
||||
|
||||
if (( $EXIT_STATUS )); then
|
||||
for (( i=0; i<10; i++ ))
|
||||
do
|
||||
github-release delete --owner "${GITHUB_REPOSITORY_OWNER}" --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
||||
sleep $(( 15 * (i + 1)))
|
||||
|
||||
|
@ -49,7 +53,7 @@ do
|
|||
if (( $EXIT_STATUS )); then
|
||||
echo "'${FILE}' hasn't been uploaded!"
|
||||
|
||||
github-release delete --owner "${GITHUB_REPOSITORY_OWNER}" --repo vscodium --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue