Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lslqtz committed Feb 4, 2024
1 parent 09d252e commit 65d64b9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,21 @@ if [ ${INPUT_COMPRESS_ASSETS^^} == "TRUE" ] || [ ${INPUT_COMPRESS_ASSETS^^} == "
RELEASE_ASSET_EXT='.zip'
MEDIA_TYPE='application/zip'
RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT}
( shopt -s dotglob; zip -vr ${RELEASE_ASSET_FILE} ${BUILD_ARTIFACTS_FOLDER} )
RELEASE_ASSET_PATH=${RELEASE_ASSET_FILE}
( shopt -s dotglob; zip -vr ${RELEASE_ASSET_PATH} ${BUILD_ARTIFACTS_FOLDER}/ )
else
RELEASE_ASSET_EXT='.tar.gz'
MEDIA_TYPE='application/gzip'
RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT}
( shopt -s dotglob; tar cvfz ${RELEASE_ASSET_FILE} ${BUILD_ARTIFACTS_FOLDER} )
RELEASE_ASSET_PATH=${RELEASE_ASSET_FILE}
( shopt -s dotglob; tar cvfz ${RELEASE_ASSET_PATH} ${BUILD_ARTIFACTS_FOLDER}/ )
fi
elif [ ${INPUT_COMPRESS_ASSETS^^} == "OFF" ] || [ ${INPUT_COMPRESS_ASSETS^^} == "FALSE" ]; then
RELEASE_ASSET_EXT=${EXT}
MEDIA_TYPE="application/octet-stream"
RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT}
cp ${BINARY_NAME}${EXT} "${BUILD_ARTIFACTS_FOLDER}/${RELEASE_ASSET_FILE}"
RELEASE_ASSET_PATH="${BUILD_ARTIFACTS_FOLDER}/${RELEASE_ASSET_FILE}"
cp ${BINARY_NAME}${EXT} ${RELEASE_ASSET_PATH}
else
echo "Invalid value for INPUT_COMPRESS_ASSETS: ${INPUT_COMPRESS_ASSETS} . Acceptable values are AUTO,ZIP, or OFF."
exit 1
Expand Down

0 comments on commit 65d64b9

Please sign in to comment.