Skip to content

Commit

Permalink
ci: add gz archives into github release
Browse files Browse the repository at this point in the history
  • Loading branch information
Lapshin committed Jan 9, 2024
1 parent 2ca17ef commit 29e09ea
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ upload_to_internal:
script:
- cd dist
- RELEASE_CHECKSUM_FILE="${CI_PROJECT_NAME}-${DIST_VERSION_FULL}-checksum.sha256"
- echo "$RELEASE_CHECKSUM_FILE" >> dist.env
- RELEASE_SRC_NAME="${CI_PROJECT_NAME}-${DIST_VERSION_FULL}-src"
- RELEASE_SRC_FILE="${RELEASE_SRC_NAME}.${ARCHIVE_EXT}"
# Create a source archive
Expand Down Expand Up @@ -593,6 +594,22 @@ upload_to_github:
- rm -rf TMP && mkdir TMP && cd TMP
# download urls
- for u in ${DIST_URL_LIST}; do curl -O -sSL --connect-timeout 10 --retry 10 "${u}"; done
- |
for n in "indent-2.2.13.tar.xz"; do
if [[ "$n" != *.tar.xz ]]; then
continue;
fi;
mkdir tmp_;
tar -xJf $n -C tmp_;
gz_file="${n//tar.xz/tar.gz}";
file_to_arch=$(find tmp_ -maxdepth 1 -printf "%P\n" )
tar -czf $gz_file -C tmp_ $file_to_arch;
sz=$(stat -c%s "${gz_file}");
printf "# %s: %s bytes\n" "${gz_file}" "${sz}" >> ${RELEASE_CHECKSUM_FILE};
sha256sum -b "${gz_file}" >> ${RELEASE_CHECKSUM_FILE};
rm -fr tmp_;
DIST_FILE_LIST="${DIST_FILE_LIST} $gz_file";
done
- ls -l
# hub release upload
- git remote remove github || true
Expand Down

0 comments on commit 29e09ea

Please sign in to comment.