Fix Makefile "version" rule.

This commit is contained in:
Paul Chote
2024-10-20 14:24:56 +01:00
committed by Gustas
parent b57be1cc08
commit c6af758ee5
2 changed files with 3 additions and 3 deletions

View File

@@ -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'

View File

@@ -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)