|
104 | 104 | cd ${BUILD_ARTIFACTS_FOLDER}
|
105 | 105 | ls -lha
|
106 | 106 |
|
107 |
| -# compress and package binary, then calculate checksum |
108 |
| -RELEASE_ASSET_EXT='.tar.gz' |
109 |
| -MEDIA_TYPE='application/gzip' |
110 |
| -RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT} |
111 |
| -if [ ${INPUT_GOOS} == 'windows' ]; then |
112 |
| -RELEASE_ASSET_EXT='.zip' |
113 |
| -MEDIA_TYPE='application/zip' |
114 |
| -RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT} |
115 |
| -( shopt -s dotglob; zip -vr ${RELEASE_ASSET_FILE} * ) |
| 107 | +if [ ${INPUT_COMPRESS_ASSETS^^} == 'TRUE' ]; then |
| 108 | + # compress and package binary, then calculate checksum |
| 109 | + RELEASE_ASSET_EXT='.tar.gz' |
| 110 | + MEDIA_TYPE='application/gzip' |
| 111 | + RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT} |
| 112 | + if [ ${INPUT_GOOS} == 'windows' ]; then |
| 113 | + RELEASE_ASSET_EXT='.zip' |
| 114 | + MEDIA_TYPE='application/zip' |
| 115 | + RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT} |
| 116 | + ( shopt -s dotglob; zip -vr ${RELEASE_ASSET_FILE} * ) |
| 117 | + else |
| 118 | + ( shopt -s dotglob; tar cvfz ${RELEASE_ASSET_FILE} * ) |
| 119 | + fi |
116 | 120 | else
|
117 |
| -( shopt -s dotglob; tar cvfz ${RELEASE_ASSET_FILE} * ) |
| 121 | + RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME} |
| 122 | + MEDIA_TYPE="application/octet-stream" |
118 | 123 | fi
|
119 | 124 | MD5_SUM=$(md5sum ${RELEASE_ASSET_FILE} | cut -d ' ' -f 1)
|
120 | 125 | SHA256_SUM=$(sha256sum ${RELEASE_ASSET_FILE} | cut -d ' ' -f 1)
|
|
0 commit comments