From 25603ac4add434cd03a7389c7deee9fd55675f60 Mon Sep 17 00:00:00 2001 From: Lars Melchior Date: Tue, 4 Aug 2020 13:12:35 +0200 Subject: [PATCH] Update publish script to set CPM.cmake version automatically (#139) * update publish script to set CPM.cmake version automatically * set a minimum development version to avoid deprecated error handler call --- .github/workflows/publish.yaml | 6 +++++- cmake/CPM.cmake | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 2262b2d..e6da736 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,11 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + + - name: Set CPM version by tag + run: sed "s/0.27.2-development-version/${GITHUB_REF/refs\/tags\/v}/g" cmake/CPM.cmake > CPM.cmake + - name: Upload CPM.cmake to release uses: svenstaro/upload-release-action@v1-release with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: cmake/CPM.cmake + file: CPM.cmake asset_name: CPM.cmake tag: ${{ github.ref }} overwrite: true diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index 290182d..7b08500 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -28,7 +28,7 @@ cmake_minimum_required(VERSION 3.14 FATAL_ERROR) -set(CURRENT_CPM_VERSION 0.27.2) +set(CURRENT_CPM_VERSION 0.27.2-development-version) if(CPM_DIRECTORY) if(NOT CPM_DIRECTORY STREQUAL CMAKE_CURRENT_LIST_DIR)