From 8efba10e2f8ddde86d1f0fdccac78da5814622ea Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 17 Oct 2022 00:45:25 +0200 Subject: Switched to configure_file to consistently generate version file --- CMakeLists.txt | 6 +----- ci/deploy-itchio.sh | 4 ++-- version.txt.conf | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) create mode 100644 version.txt.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 6903cda..8797278 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,7 @@ add_subdirectory(NetEx) add_subdirectory(Starserver) add_subdirectory(StarsEx) add_subdirectory(Starshatter) -add_custom_target( - version ALL - BYPRODUCTS version - COMMAND ${CMAKE_COMMAND} -E echo "${STARSHATTER_VERSION}" >version - ) +configure_file(version.txt.conf ${CMAKE_CURRENT_BINARY_DIR}/version.txt @ONLY) install( FILES NOTICE COPYING COMPONENT Copyright diff --git a/ci/deploy-itchio.sh b/ci/deploy-itchio.sh index 41e4e45..2d5ee9f 100755 --- a/ci/deploy-itchio.sh +++ b/ci/deploy-itchio.sh @@ -4,6 +4,6 @@ install_component() { } install_component Copyright install_component Runtime -butler push $staging $target:$branch-executables-only-windows-x86 --userversion-file $builddir/version +butler push $staging $target:$branch-executables-only-windows-x86 --userversion-file $builddir/version.txt install_component Resources -butler push $staging $target:$branch-full-windows-x86 --userversion-file $builddir/version +butler push $staging $target:$branch-full-windows-x86 --userversion-file $builddir/version.txt diff --git a/version.txt.conf b/version.txt.conf new file mode 100644 index 0000000..c1f5369 --- /dev/null +++ b/version.txt.conf @@ -0,0 +1 @@ +@STARSHATTER_VERSION@ -- cgit v1.1