Skip to content

Commit ccabef4

Browse files
authored
create bundle names with desired processor strings (#1186)
1 parent 8c266d5 commit ccabef4

File tree

2 files changed

+12
-27
lines changed

2 files changed

+12
-27
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,6 @@ jobs:
3939
files: |
4040
${{ runner.workspace }}/downloads/**/*.zip
4141
42-
# These final two steps are only necessary because we prefer a different
43-
# release artifact name than is created by CMake, and so we could change
44-
# the CMake configuration or add an inline (shell) run step to manipulate
45-
# the filenames. The pre-release build doesn't rename the artifacts.
46-
- name: Upload Linux ARM64 With a Different Name
47-
uses: actions/upload-release-asset@v1
48-
env:
49-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50-
with:
51-
upload_url: ${{ steps.get_release.outputs.upload_url }}
52-
asset_path: ${{ runner.workspace }}/downloads/linux-arm64/ziti-edge-tunnel-Linux_aarch64.zip
53-
asset_name: ziti-edge-tunnel-Linux_arm64.zip
54-
asset_content_type: application/octet-stream
55-
56-
- name: Upload Windows With a Different Name
57-
uses: actions/upload-release-asset@v1
58-
env:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60-
with:
61-
upload_url: ${{ steps.get_release.outputs.upload_url }}
62-
asset_path: ${{ runner.workspace }}/downloads/windows-x64-mingw/ziti-edge-tunnel-Windows_AMD64.zip
63-
asset_name: ziti-edge-tunnel-Windows_x86_64.zip
64-
asset_content_type: application/octet-stream
65-
6642
- name: Get the Version String from Git Tag
6743
id: get_version
6844
run: |

CMakeLists.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,23 @@ if (TLSUV_TLSLIB AND NOT TLSUV_TLSLIB STREQUAL "openssl")
142142
set(comp-flavor "-${TLSUV_TLSLIB}")
143143
message(NOTICE "binary marker: ${comp-flavor}")
144144
endif ()
145+
146+
if(CMAKE_SYSTEM_PROCESSOR} STREQUAL AMD64)
147+
set(bundle_processor "x86_64")
148+
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
149+
set(bundle_processor "arm64")
150+
else()
151+
set(bundle_processor ${CMAKE_SYSTEM_PROCESSOR})
152+
endif()
153+
145154
macro(BUNDLE_COMP comp)
146155
add_custom_target(${comp}-bundle
147-
BYPRODUCTS ${CMAKE_BINARY_DIR}/bundle/${comp}${comp-flavor}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip
156+
BYPRODUCTS ${CMAKE_BINARY_DIR}/bundle/${comp}-${CMAKE_SYSTEM_NAME}_${bundle_processor}${comp-flavor}.zip
148157
DEPENDS ${comp}
149158
# use generator expression to set working directory to the target's build directory. this works for multi-config generators, e.g. when "--config" is specified at build time.
150159
WORKING_DIRECTORY "$<TARGET_FILE_DIR:${comp}>"
151-
COMMENT "adding components to bundle ${comp} for ${CMAKE_SYSTEM_NAME}:${CMAKE_SYSTEM_PROCESSOR}: $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS}"
152-
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${CMAKE_BINARY_DIR}/bundle/${comp}${comp-flavor}-${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}.zip" --format=zip -- $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS})
160+
COMMENT "adding components to bundle ${comp} for ${CMAKE_SYSTEM_NAME}:${bundle_processor}: $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS}"
161+
COMMAND ${CMAKE_COMMAND} -E tar "cf" "${CMAKE_BINARY_DIR}/bundle/${comp}-${CMAKE_SYSTEM_NAME}_${bundle_processor}${comp-flavor}.zip" --format=zip -- $<TARGET_FILE_NAME:${comp}> ${${comp}_BUNDLE_COMPS})
153162
add_dependencies(bundle ${comp}-bundle)
154163
endmacro()
155164

0 commit comments

Comments
 (0)