From 48ea912d332cd1b31a2928745d5b488bc7c42ca5 Mon Sep 17 00:00:00 2001 From: Zike Yang Date: Thu, 24 Nov 2022 18:11:42 +0800 Subject: [PATCH] [improve] Skip include debug artifact in the release and tar the windows artifacts Motivation The debug artifact for the windows system is too large. They are only used for debugging and doesn't need to include in the release. And it's better to zip tar the `windows-static` artifact to make it easier to download through the command line. The final result looks like this: https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-cpp/pulsar-client-cpp-3.1.0-candidate-1/ Modification * Skip include the windows debug artifact in the release * Tar `windows-static` artifact in the release. --- build-support/download-release-artifacts.py | 3 +++ build-support/stage-release.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/build-support/download-release-artifacts.py b/build-support/download-release-artifacts.py index 774ffdc8..211faba4 100755 --- a/build-support/download-release-artifacts.py +++ b/build-support/download-release-artifacts.py @@ -45,6 +45,9 @@ data = json.loads(response.read().decode("utf-8")) for artifact in data['artifacts']: name = artifact['name'] + # Skip debug artifact + if name.endswith("-Debug"): + continue url = artifact['archive_download_url'] print('Downloading %s from %s' % (name, url)) diff --git a/build-support/stage-release.sh b/build-support/stage-release.sh index 93b5c412..2f26d383 100755 --- a/build-support/stage-release.sh +++ b/build-support/stage-release.sh @@ -39,6 +39,12 @@ cd $PULSAR_CPP_PATH build-support/generate-source-archive.sh $DEST_PATH build-support/download-release-artifacts.py $WORKFLOW_ID $DEST_PATH +pushd "$DEST_PATH" +tar cvzf x64-windows-static.tar.gz x64-windows-static +tar cvzf x86-windows-static.tar.gz x86-windows-static +rm -r x64-windows-static x86-windows-static +popd + # Sign all files cd $DEST_PATH find . -type f | xargs $PULSAR_CPP_PATH/build-support/sign-files.sh