Automatically generate version information for SonarCloud (#5329)

This commit is contained in:
Oleg Derevenetz
2022-04-24 15:43:45 +03:00
committed by GitHub
parent bc49f4dfdc
commit 53431958dc
2 changed files with 7 additions and 3 deletions
+3
View File
@@ -36,6 +36,9 @@ jobs:
key: sonarcloud-cfamily-cache-${{ hashFiles( 'src/**/*.c', 'src/**/*.cpp', 'src/**/*.h' ) }}
restore-keys: |
sonarcloud-cfamily-cache-
- name: Generate version information
run: |
sed -i~ "s/%{version}/$(cat version.txt)/" sonar-project.properties
- name: Build
run: |
~/.sonarcloud/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output make -j 2
+4 -3
View File
@@ -3,11 +3,12 @@ sonar.organization=ihhub
# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=fheroes2
sonar.projectVersion=0.9.14
# CI will automatically replace this with the contents of the version.txt file.
sonar.projectVersion=%{version}
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8