Skip to content

Commit

Permalink
Add short commit hash and branch name to version string
Browse files Browse the repository at this point in the history
  • Loading branch information
wzkres authored Jan 28, 2024
1 parent 597c9c0 commit 354242a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ jobs:
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DPVE_DDNS_CLIENT_VER="0.0.4" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> "$GITHUB_ENV"
cmake -B ${{github.workspace}}/build -DPVE_DDNS_CLIENT_VER="0.0.4_${{env.sha_short}}_${{env.branch}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
Expand Down

0 comments on commit 354242a

Please sign in to comment.