From: Michael Wallner Date: Thu, 17 Dec 2020 09:02:36 +0000 (+0100) Subject: cpack: artifacts X-Git-Tag: 1.1.0-beta1~49 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d089107e59bb1f5fb6fb567a4be33c4788b0181f;p=m6w6%2Flibmemcached cpack: artifacts --- diff --git a/CPack.txt b/CPack.txt index 52fefe69..92ea4503 100644 --- 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 index 00000000..2b80cac1 --- /dev/null +++ b/CPack/ProjectConfig.txt @@ -0,0 +1 @@ +string(APPEND CPACK_PACKAGE_DIRECTORY "/${CPACK_GENERATOR}") diff --git a/scripts/push-artifacts.conf b/scripts/push-artifacts.conf index 6d1e8f20..80d95314 100644 --- a/scripts/push-artifacts.conf +++ b/scripts/push-artifacts.conf @@ -1,5 +1,7 @@ StrictHostKeyChecking no UserKnownHostsFile /dev/null +BatchMode yes +LogLevel QUIET User artifacts Port 2 HostName artifacts.m6w6.name diff --git a/scripts/push-artifacts.sh b/scripts/push-artifacts.sh index 6ed63d27..51aab2d4 100755 --- a/scripts/push-artifacts.sh +++ b/scripts/push-artifacts.sh @@ -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/