cpack: artifacts
authorMichael Wallner <mike@php.net>
Thu, 17 Dec 2020 09:02:36 +0000 (10:02 +0100)
committerMichael Wallner <mike@php.net>
Thu, 17 Dec 2020 09:02:36 +0000 (10:02 +0100)
CPack.txt
CPack/ProjectConfig.txt [new file with mode: 0644]
scripts/push-artifacts.conf
scripts/push-artifacts.sh

index 52fefe69fb5973f5cd12639b3fa466cbb53c8d6f..92ea450381c2646d49ae231dab1b1eff220479cf 100644 (file)
--- a/CPack.txt
+++ b/CPack.txt
@@ -39,6 +39,7 @@ memcached server (http://memcached.org/). It has been designed to be
 light on memory usage, thread safe, and provide full access to server
 side methods.")
 list(JOIN PROJECT_CONFIG "-" CPACK_PACKAGE_DIRECTORY)
+set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/CPack/ProjectConfig.txt")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}/${PROJECT_VERSION}")
 set(CPACK_PACKAGE_CHECKSUM SHA1)
@@ -46,13 +47,15 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
 set(CPACK_CHANGELOG_FILE "${CMAKE_SOURCE_DIR}/ChangeLog-1.1.md")
 
-
 execute_process(
         COMMAND git describe --tags --match [0-9]*.*
         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
         OUTPUT_VARIABLE PROJECT_TAG
-        ERROR_VARIABLE IGNORED
+        ERROR_VARIABLE GIT_ERROR_OUTPUT
 )
+if(ERROR_OUTPUT)
+    message(NOTICE "git describe: ${GIT_ERROR_OUTPUT}")
+endif()
 string(STRIP "${PROJECT_TAG}" PROJECT_TAG)
 if(PROJECT_TAG)
     set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_TAG})
@@ -92,8 +95,8 @@ endif()
 include(CPack)
 
 add_custom_target(push-artifacts
-        COMMAND ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh
-            ${CPACK_PACKAGE_DIRECTORY}/${PROJECT_NAME}-*
+        COMMAND
+            bash ${CMAKE_SOURCE_DIR}/scripts/push-artifacts.sh "${CPACK_PACKAGE_DIRECTORY}/"
         WORKING_DIRECTORY ${CPACK_BINARY_DIR}
         )
 
diff --git a/CPack/ProjectConfig.txt b/CPack/ProjectConfig.txt
new file mode 100644 (file)
index 0000000..2b80cac
--- /dev/null
@@ -0,0 +1 @@
+string(APPEND CPACK_PACKAGE_DIRECTORY "/${CPACK_GENERATOR}")
index 6d1e8f20b468930e818bd57ef9b55fb8a390db8d..80d9531432a562d235b20cecf6982d7f55c95c5e 100644 (file)
@@ -1,5 +1,7 @@
 StrictHostKeyChecking no
 UserKnownHostsFile /dev/null
+BatchMode yes
+LogLevel QUIET
 User artifacts
 Port 2
 HostName artifacts.m6w6.name
index 6ed63d27ea800298c6e9f9b7ae50c1865a1a0c13..51aab2d4349a994a9497d135ba3a4da769d4cf46 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # push artifacts to https://artifacts.m6w6.name/libmemcached/
 
 if test -n "$PUSH_ARTIFACTS_ID"
@@ -8,4 +8,4 @@ then
 fi
 
 RSYNC_CONF=$(dirname $0)/push-artifacts.conf
-rsync -RPae "ssh -F $RSYNC_CONF" "$@" m6w6.name::artifacts/libmemcached/
+rsync -RPae "ssh -F $RSYNC_CONF" --exclude "_CPack_Packages" "$@" m6w6.name::artifacts/libmemcached/