@@ -5,6 +5,7 @@ MONO_VERSION:= $(shell mono --version | awk '/version/ { print $$5 }')
5
5
MIN_NUGET_VERSION: = "2.16.0"
6
6
NUGET_VERSION: = $(shell nuget help 2> /dev/null | awk '/Version:/ { print $$3; exit 0}')
7
7
GreaterVersion = $(shell printf '% s\n' $(1 ) $(2 ) | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr | head -n 1)
8
+ PROGRAM_VERSION = $(shell git describe --tags --exact-match 2> /dev/null)
8
9
9
10
# Directories
10
11
DEBUG_DIR := bin_debug
@@ -157,11 +158,31 @@ $(MAC_BUILD_RESULT): all-release
157
158
158
159
@echo $(COLOR_RED)Creating $(COLOR_CYAN)$(MAC_BUILD_RESULT)$(COLOR_END)
159
160
@hdiutil create $(MAC_BUILD_RESULT) -volname "OpenBVE" -fs HFS+ -srcfolder "mac/OpenBVE.app"
161
+ @echo Renaming final output file
162
+ ifeq (, $(PROGRAM_VERSION ) )
163
+ @echo This is a $(COLOR_BLUE)Daily build$(COLOR_END)
164
+ @echo Final filename: $(COLOR_RED)OpenBVE-$$(date '+%F').dmg$(COLOR_END)
165
+ @mv macbuild.dmg OpenBVE-$$(date '+%F').dmg
166
+ else
167
+ @echo This is a $(COLOR_YELLOW)Tagged Release build$(COLOR_END)
168
+ @echo Final filename: $(COLOR_RED)OpenBVE-$(PROGRAM_VERSION).dmg$(COLOR_END)
169
+ @mv macbuild.dmg OpenBVE-$(PROGRAM_VERSION).dmg
170
+ endif
160
171
161
172
$(LINUX_BUILD_RESULT ) : all-release
162
173
@rm -rf bin_release/DevTools/
163
174
@echo $(COLOR_RED ) Compressing $(COLOR_CYAN )$(LINUX_BUILD_RESULT )$(COLOR_END )
164
175
@cd $(RELEASE_DIR ) ; zip -qr9Z deflate ../$(LINUX_BUILD_RESULT ) *
176
+ @echo Renaming final output file
177
+ ifeq (, $(PROGRAM_VERSION ) )
178
+ @echo This is a $(COLOR_BLUE)Daily build$(COLOR_END)
179
+ @echo Final filename: $(COLOR_RED)OpenBVE-$$(date '+%F').zip$(COLOR_END)
180
+ @mv linuxbuild.zip OpenBVE-$$(date '+%F').zip
181
+ else
182
+ @echo This is a $(COLOR_YELLOW)Tagged Release build$(COLOR_END)
183
+ @echo Final filename: $(COLOR_RED)OpenBVE-$(PROGRAM_VERSION).zip$(COLOR_END)
184
+ @mv linuxbuild.zip OpenBVE-$(PROGRAM_VERSION).zip
185
+ endif
165
186
166
187
$(DEBIAN_BUILD_RESULT ) : all-release
167
188
@rm -rf bin_release/DevTools/
@@ -174,3 +195,13 @@ $(DEBIAN_BUILD_RESULT): all-release
174
195
@cp -r -f $(CP_UPDATE_FLAG) $(RELEASE_DIR)/* installers/debian/usr/lib/openbve
175
196
@echo $(COLOR_RED)Compressing $(COLOR_CYAN)$(DEBIAN_BUILD_RESULT)$(COLOR_END)
176
197
@fakeroot dpkg-deb --build installers/debian
198
+ @echo Renaming final output file
199
+ ifeq (, $(PROGRAM_VERSION ) )
200
+ @echo This is a $(COLOR_BLUE)Daily build$(COLOR_END)
201
+ @echo Final filename: $(COLOR_RED)OpenBVE-$$(date '+%F').deb$(COLOR_END)
202
+ @mv debianbuild.deb OpenBVE-$$(date '+%F').deb
203
+ else
204
+ @echo This is a $(COLOR_YELLOW)Tagged Release build$(COLOR_END)
205
+ @echo Final filename: $(COLOR_RED)OpenBVE-$$(date '+%F').deb$(COLOR_END)
206
+ @mv debianbuild.deb OpenBVE-$(PROGRAM_VERSION).deb
207
+ endif
0 commit comments