mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-26 03:46:49 -08:00
Fail on unset GIT_DESC/GIT_COMMIT
This commit is contained in:
1 parent
78addc1f22
commit
caa191ff06
3 files changed
+8
-4
No files matched your search
@@ -141,6 +141,8 @@ jobs:
|
||||
-DFETCHCONTENT_BASE_DIR=${{github.workspace}}/cmake-fetch
|
||||
--preset dashboard
|
||||
-DWIVRN_USE_SYSTEM_OPENXR=OFF
|
||||
-DGIT_DESC=${{github.sha}}
|
||||
-DGIT_COMMIT=${{github.sha}}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
|
||||
@@ -20,15 +20,13 @@ if (NOT GIT_COMMIT)
|
||||
endif()
|
||||
|
||||
if (NOT GIT_DESC)
|
||||
set(GIT_DESC v${CMAKE_PROJECT_VERSION})
|
||||
message(STATUS "Setting version to ${GIT_DESC} from CMakeLists")
|
||||
message(FATAL_ERROR "GIT_DESC cannot be inferred from .git and was not provided at build time")
|
||||
endif()
|
||||
|
||||
if (GIT_COMMIT)
|
||||
message(STATUS "Setting commit to ${GIT_COMMIT}")
|
||||
else()
|
||||
set(GIT_COMMIT "")
|
||||
message(STATUS "Not setting commit")
|
||||
message(FATAL_ERROR "GIT_COMMIT cannot be inferred from .git and was not provided at build time")
|
||||
endif()
|
||||
|
||||
configure_file(${INPUT_FILE} ${OUTPUT_FILE})
|
||||
@@ -64,6 +64,10 @@
|
||||
|
||||
buildInputs = oldAttrs.buildInputs ++ extraBuildInputs;
|
||||
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ extraNativeBuildInputs;
|
||||
cmakeFlags = (oldAttrs.cmakeFlags or []) ++ [
|
||||
(lib.cmakeFeature "GIT_DESC" "nightly")
|
||||
(lib.cmakeFeature "GIT_COMMIT" "nightly")
|
||||
];
|
||||
}));
|
||||
in {
|
||||
packages = {
|
||||
|
||||
Reference in new issue
Block a user