File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ RM_R = $(RM) -r
61
61
RM_F = $(RM ) -f
62
62
RM_RF = $(RM ) -rf
63
63
64
- VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
64
+ # Only for use in target version:
65
+ VERSION := $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || (c=$$(git rev-parse --short HEAD 2>/dev/null ) && echo git-$$c) )
65
66
66
67
# Detect target platform for dependencies if not given by the user
67
68
ifndef TARGETPLATFORM
@@ -136,8 +137,11 @@ test: all
136
137
# ############ LOCAL INSTALLATION AND DOWNSTREAM PACKAGING ##############
137
138
#
138
139
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
139
- @sh -c ' . ./packaging/functions.sh; set_engine_version $(VERSION) .'
140
- @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'
140
+ ifeq ($(VERSION ) ,)
141
+ $(error Unable to determine new version (requires git or override of variable VERSION))
142
+ endif
143
+ @sh -c '. ./packaging/functions.sh; set_engine_version "$(VERSION)" .'
144
+ @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'
141
145
142
146
install :
143
147
@sh -c ' . ./packaging/functions.sh; install_assemblies_mono $(CWD) $(DESTDIR)$(gameinstalldir) $(TARGETPLATFORM) True True True'
You can’t perform that action at this time.
0 commit comments