You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by zi...@apache.org on 2022/12/01 03:12:12 UTC

[pulsar-client-cpp] 01/02: [improve] Skip include debug artifact in the release and tar the windows artifacts (#124)

This is an automated email from the ASF dual-hosted git repository.

zike pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/pulsar-client-cpp.git

commit 411843eb9a4337e54c447884ac686b472bd404d4
Author: Zike Yang <zi...@apache.org>
AuthorDate: Thu Nov 24 20:15:10 2022 +0800

    [improve] Skip include debug artifact in the release and tar the windows artifacts (#124)
    
    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 774ffdc..211faba 100755
--- a/build-support/download-release-artifacts.py
+++ b/build-support/download-release-artifacts.py
@@ -45,6 +45,9 @@ with urllib.request.urlopen(request) as response:
     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 93b5c41..2f26d38 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