From d75a04f81d0b7694c267fb48fae6ff114f316719 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 12 May 2024 03:06:18 +0000 Subject: [PATCH] fix: syntax --- release.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release.sh b/release.sh index fbaf1fa..58ec3d4 100755 --- a/release.sh +++ b/release.sh @@ -95,12 +95,12 @@ else fi fi -BASE_SERVER_URL='' +# base uploader command +BASE_UPLOADER_COMMAND="github-assets-uploader -logtostderr ${GITHUB_ASSETS_UPLOADR_EXTRA_OPTIONS} -repo ${RELEASE_REPO} -token ${INPUT_GITHUB_TOKEN} -tag=${RELEASE_TAG} -releasename=${RELEASE_NAME} -retry ${INPUT_RETRY}" if [ ${GITHUB_SERVER_URL} != 'https://github.com' ]; then - BASE_SERVER_URL=${GITHUB_SERVER_URL} + BASE_UPLOADER_COMMAND="${BASE_UPLOADER_COMMAND} -baseurl ${GITHUB_SERVER_URL}" fi - # build BUILD_ARTIFACTS_FOLDER=build-artifacts-$(date +%s) if [ ${INPUT_MULTI_BINARIES^^} == 'TRUE' ]; then @@ -192,19 +192,19 @@ fi if [ ${INPUT_UPLOAD^^} == 'TRUE' ]; then # update binary and checksum - github-assets-uploader -logtostderr -f ${RELEASE_ASSET_PATH} -mediatype ${MEDIA_TYPE} ${GITHUB_ASSETS_UPLOADR_EXTRA_OPTIONS} -repo ${RELEASE_REPO} -token ${INPUT_GITHUB_TOKEN} -tag=${RELEASE_TAG} -releasename=${RELEASE_NAME} -retry ${INPUT_RETRY} -baseurl ${BASE_SERVER_URL} + ${BASE_UPLOADER_COMMAND} -f ${RELEASE_ASSET_PATH} -mediatype ${MEDIA_TYPE} if [ ${INPUT_MD5SUM^^} == 'TRUE' ]; then MD5_EXT='.md5' MD5_MEDIA_TYPE='text/plain' echo ${MD5_SUM} >${RELEASE_ASSET_PATH}${MD5_EXT} - github-assets-uploader -logtostderr -f ${RELEASE_ASSET_PATH}${MD5_EXT} -mediatype ${MD5_MEDIA_TYPE} ${GITHUB_ASSETS_UPLOADR_EXTRA_OPTIONS} -repo ${RELEASE_REPO} -token ${INPUT_GITHUB_TOKEN} -tag=${RELEASE_TAG} -releasename=${RELEASE_NAME} -retry ${INPUT_RETRY} -baseurl ${BASE_SERVER_URL} + ${BASE_UPLOADER_COMMAND} -f ${RELEASE_ASSET_PATH}${MD5_EXT} -mediatype ${MD5_MEDIA_TYPE} fi if [ ${INPUT_SHA256SUM^^} == 'TRUE' ]; then SHA256_EXT='.sha256' SHA256_MEDIA_TYPE='text/plain' echo ${SHA256_SUM} >${RELEASE_ASSET_PATH}${SHA256_EXT} - github-assets-uploader -logtostderr -f ${RELEASE_ASSET_PATH}${SHA256_EXT} -mediatype ${SHA256_MEDIA_TYPE} ${GITHUB_ASSETS_UPLOADR_EXTRA_OPTIONS} -repo ${RELEASE_REPO} -token ${INPUT_GITHUB_TOKEN} -tag=${RELEASE_TAG} -releasename=${RELEASE_NAME} -retry ${INPUT_RETRY} -baseurl ${BASE_SERVER_URL} + ${BASE_UPLOADER_COMMAND} -f ${RELEASE_ASSET_PATH}${SHA256_EXT} -mediatype ${SHA256_MEDIA_TYPE} fi fi