Skip to content

Commit

Permalink
Fixing naming of packages
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Nov 19, 2021
1 parent 9320702 commit 3759bba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ else()
endif(BUILD_IS_RELEASE)

message(STATUS "Building version ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
message(STATUS "Commit hash ${GIT_COMMIT_HASH} : ${GIT_COMMIT_DATE}")


# Visual Studio stores user build settings in file 'CmakeSettings.json'. We would like to manage that via a project template.
# To push out new template, update 'template_uuid' field in 'template_file' with value from https://www.uuidgenerator.net/
Expand Down Expand Up @@ -123,6 +125,9 @@ if(MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
endif()
message(STATUS "Compiling for architecture: ${CMAKE_SYSTEM_PROCESSOR}")

get_platform_name(FULL_PLATFORM_NAME)
message(STATUS "Full Platform name: ${FULL_PLATFORM_NAME}")

# Windows setjmp does not work as Unix's
# by it default will unwind the stack, which is not possible in generated code
# setjmp has an extra argument not exposed in C to avoid unwinding
Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ def uploadStackVM(platform, configuration, archiveName, isStableRelease = false)
unstash name: "packages-${archiveName}-StackVM-${configuration}"

def wordSize = is32Bits(platform) ? "32" : "64"

sh(script: "cp build-StackVM/build/packages/PharoVM-*-${archiveName}-bin.zip build-StackVM/build/packages/PharoVM-*-${archiveName}-StackVM-bin.zip")

def expandedBinaryFileName = sh(returnStdout: true, script: "ls build-StackVM/build/packages/PharoVM-*-${archiveName}-StackVM-bin.zip").trim()

def oldName = sh(returnStdout: true, script: "ls build-stockReplacement/build/packages/PharoVM-*-${archiveName}-bin.zip").trim()
def expandedBinaryFileName = oldName.replaceAll("-bin.zip", "-StackVM-bin.zip")
sh(script: "cp ${oldName} ${expandedBinaryFileName}")
sshagent (credentials: ['b5248b59-a193-4457-8459-e28e9eb29ed7']) {
sh "scp -o StrictHostKeyChecking=no \
${expandedBinaryFileName} \
Expand Down
6 changes: 2 additions & 4 deletions cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ install(
COMPONENT include
FILES_MATCHING PATTERN *.h)

get_platform_name(FULL_PLATFORM_NAME)

set(CPACK_PACKAGE_DESCRIPTION "${APPNAME} Headless VM for ${FULL_PLATFORM_NAME}")
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
Expand All @@ -87,9 +85,9 @@ set(CPACK_PACKAGE_VENDOR "${APPNAME}")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://pharo.org")

if(ALWAYS_INTERACTIVE)
set(CPACK_PACKAGE_FILE_NAME "${APPNAME}VM-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${GIT_COMMIT_HASH}-${FULL_PLATFORM_NAME}-stockReplacement")
set(CPACK_PACKAGE_FILE_NAME "${APPNAME}VM-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH_NUMBER}-${GIT_COMMIT_HASH}-${FULL_PLATFORM_NAME}-stockReplacement")
else()
set(CPACK_PACKAGE_FILE_NAME "${APPNAME}VM-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${GIT_COMMIT_HASH}-${FULL_PLATFORM_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${APPNAME}VM-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH_NUMBER}-${GIT_COMMIT_HASH}-${FULL_PLATFORM_NAME}")
endif()

set(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/build/packages")
Expand Down

0 comments on commit 3759bba

Please sign in to comment.