Fix git hash detection for release builds
This commit is contained in:
+7
-2
@@ -17,8 +17,13 @@ if(NOT (ret STREQUAL "0"))
|
|||||||
"git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake."
|
"git was not found on your path. If you collect bug reports, please add git to your path and rerun cmake."
|
||||||
)
|
)
|
||||||
set(SM_VERSION_GIT_HASH "UNKNOWN")
|
set(SM_VERSION_GIT_HASH "UNKNOWN")
|
||||||
set(SM_VERSION_GIT
|
if(WITH_FULL_RELEASE)
|
||||||
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}-${SM_VERSION_GIT_HASH}")
|
set(SM_VERSION_GIT
|
||||||
|
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}")
|
||||||
|
else()
|
||||||
|
set(SM_VERSION_GIT
|
||||||
|
"${SM_VERSION_MAJOR}.${SM_VERSION_MINOR}.${SM_VERSION_PATCH}-${SM_VERSION_GIT_HASH}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
if(WITH_FULL_RELEASE)
|
if(WITH_FULL_RELEASE)
|
||||||
set(SM_VERSION_GIT
|
set(SM_VERSION_GIT
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ cd "$(dirname $0)"
|
|||||||
docker build -f Dockerfile-linux-amd64 . -t itgmania-linux-build:amd64
|
docker build -f Dockerfile-linux-amd64 . -t itgmania-linux-build:amd64
|
||||||
|
|
||||||
docker run -i -v $(pwd)/..:/data itgmania-linux-build:amd64 sh -eux <<'EOF'
|
docker run -i -v $(pwd)/..:/data itgmania-linux-build:amd64 sh -eux <<'EOF'
|
||||||
|
git config --global --add safe.directory /data
|
||||||
cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On
|
cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On
|
||||||
cmake --build /tmp/Build -j $(nproc)
|
cmake --build /tmp/Build -j $(nproc)
|
||||||
cmake --build /tmp/Build --target package
|
cmake --build /tmp/Build --target package
|
||||||
|
|||||||
Reference in New Issue
Block a user