From f52f4b9dcd27f0b15b2c38742c89e411cfd57e3c Mon Sep 17 00:00:00 2001 From: ekoby <7406535+ekoby@users.noreply.github.com> Date: Wed, 25 Nov 2020 10:49:18 -0500 Subject: [PATCH] correct version (#189) * use all tags(inc lightweight) for version * set BUILD_NUMBER --- .github/workflows/build-release.yml | 2 ++ .github/workflows/cmake.yml | 2 ++ git.cmake | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6309d98b..7bcb1d12 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -8,6 +8,8 @@ jobs: build: runs-on: ${{ matrix.os }} + env: + BUILD_NUMBER: ${{ github.GITHUB_RUN_NUMBER }} strategy: matrix: os: diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2010e6b2..f3cfa4da 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -8,6 +8,8 @@ jobs: build: runs-on: ${{ matrix.os }} + env: + BUILD_NUMBER: ${{ github.GITHUB_RUN_NUMBER }} strategy: matrix: os: diff --git a/git.cmake b/git.cmake index 61f376ee..bd726f45 100644 --- a/git.cmake +++ b/git.cmake @@ -32,7 +32,7 @@ endif() # lookup most recent tag to derive version execute_process( - COMMAND git describe HEAD + COMMAND git describe --tags HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_INFO OUTPUT_STRIP_TRAILING_WHITESPACE