From c6af758ee584df7fd0caee759fbdf56013470942 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 20 Oct 2024 14:24:56 +0100 Subject: [PATCH] Fix Makefile "version" rule. --- Makefile | 4 ++-- make.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index acfa25f433..23a67e1585 100644 --- a/Makefile +++ b/Makefile @@ -153,12 +153,12 @@ tests: ############# LOCAL INSTALLATION AND DOWNSTREAM PACKAGING ############## # -version: VERSION mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml +version: VERSION mods/*/mod.yaml ifeq ($(VERSION),) $(error Unable to determine new version (requires git or override of variable VERSION)) endif @sh -c '. ./packaging/functions.sh; set_engine_version "$(VERSION)" .' - @sh -c '. ./packaging/functions.sh; set_mod_version "$(VERSION)" mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modcontent/mod.yaml mods/all/mod.yaml' + @sh -c '. ./packaging/functions.sh; set_mod_version "$(VERSION)" mods/*/mod.yaml' install: @sh -c '. ./packaging/functions.sh; install_assemblies $(CWD) $(DESTDIR)$(gameinstalldir) $(TARGETPLATFORM) $(RUNTIME) True True True' diff --git a/make.ps1 b/make.ps1 index 20a2aed946..66cfcbfc03 100644 --- a/make.ps1 +++ b/make.ps1 @@ -74,7 +74,7 @@ function Version-Command if ($version -ne $null) { $version | out-file ".\VERSION" - $mods = @("mods/ra/mod.yaml", "mods/cnc/mod.yaml", "mods/d2k/mod.yaml", "mods/ts/mod.yaml", "mods/modcontent/mod.yaml", "mods/all/mod.yaml") + $mods = Get-ChildItem ./mods/*/mod.yaml | Select-Object -Expand FullName foreach ($mod in $mods) { $replacement = (gc $mod) -Replace "Version:.*", ("Version: {0}" -f $version)