OSDN Git Service

[actions][cmake] Add --tags option to git describe
authorStarg <starg@users.osdn.me>
Sun, 25 Sep 2022 05:09:08 +0000 (14:09 +0900)
committerStarg <starg@users.osdn.me>
Sun, 25 Sep 2022 05:09:08 +0000 (14:09 +0900)
.github/workflows/build.yml
WriteVersion.cmake

index ff6224f..b592402 100644 (file)
@@ -37,7 +37,7 @@ jobs:
           fetch-depth: 0
 
       - name: Run "git describe"
-        run: echo "TIM41_DESCRIBE=$(git describe --first-parent)" >> $GITHUB_ENV
+        run: echo "TIM41_DESCRIBE=$(git describe --first-parent --tags)" >> $GITHUB_ENV
         shell: bash
         working-directory: timidity41
 
index 3d0b0ed..9601358 100644 (file)
@@ -1,6 +1,6 @@
 
 execute_process(
-    COMMAND "${GIT_EXECUTABLE}" describe --first-parent
+    COMMAND "${GIT_EXECUTABLE}" describe --first-parent --tags
     OUTPUT_VARIABLE gitDescribeResult
     OUTPUT_STRIP_TRAILING_WHITESPACE
 )