Skip to content

Commit

Permalink
Updated makefile for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
hbeni committed Aug 3, 2020
1 parent 4b17ffe commit 8c471c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
10 changes: 5 additions & 5 deletions client/mumble-plugin/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ CFLAGS=-I. -I./lib -pthread $(DEBUG)
# get version
GITCOMMIT:=$(shell git log -1 --pretty=format:"%h")
GITDATE:=$(shell git log -1 --pretty=format:"%cd" --date=short)
VERSION_V:=$(shell grep -m1 FGCOM_VERSION_MAJOR fgcom-mumble.cpp |grep -E -o '[0-9]')
VERSION_M:=$(shell grep -m1 FGCOM_VERSION_MINOR fgcom-mumble.cpp |grep -E -o '[0-9]')
VERSION_P:=$(shell grep -m1 FGCOM_VERSION_PATCH fgcom-mumble.cpp |grep -E -o '[0-9]')
VERSION_V:=$(shell grep -m1 FGCOM_VERSION_MAJOR lib/fgcom-mumble.h |grep -E -o '[0-9]')
VERSION_M:=$(shell grep -m1 FGCOM_VERSION_MINOR lib/fgcom-mumble.h |grep -E -o '[0-9]')
VERSION_P:=$(shell grep -m1 FGCOM_VERSION_PATCH lib/fgcom-mumble.h |grep -E -o '[0-9]')
VERSION:=$(VERSION_V).$(VERSION_M).$(VERSION_P)


Expand Down Expand Up @@ -77,7 +77,7 @@ release: clean-all plugin plugin-win64
mkdir fgcom-mumble-linux-$(VERSION)/plugin
rm -f fgcom-mumble-linux*.tar.gz
cp releaseReadme.md fgcom-mumble-linux-$(VERSION)/README.md
cp ../../LICENSE ../../Readme.architecture.md ../plugin.spec.md fgcom-mumble-linux-$(VERSION)
cp ../../LICENSE ../../README-de_DE.md ../../Readme.architecture.md ../plugin.spec.md fgcom-mumble-linux-$(VERSION)
cp fgcom-mumble.so fgcom-mumble-linux-$(VERSION)/plugin
cp -r ../fgfs/ fgcom-mumble-linux-$(VERSION)
tar -czf fgcom-mumble-linux-$(VERSION).tar.gz fgcom-mumble-linux-$(VERSION)/
Expand All @@ -87,7 +87,7 @@ release: clean-all plugin plugin-win64
mkdir fgcom-mumble-windows-$(VERSION)/plugin
rm -f fgcom-mumble-windows*.zip
cp releaseReadme.md fgcom-mumble-windows-$(VERSION)/README.md
cp ../../LICENSE ../../Readme.architecture.md ../plugin.spec.md fgcom-mumble-windows-$(VERSION)
cp ../../LICENSE ../../README-de_DE.md ../../Readme.architecture.md ../plugin.spec.md fgcom-mumble-windows-$(VERSION)
cp fgcom-mumble.dll fgcom-mumble-windows-$(VERSION)/plugin
cp -r ../fgfs/ fgcom-mumble-windows-$(VERSION)
zip -r fgcom-mumble-windows-$(VERSION).zip fgcom-mumble-windows-$(VERSION)
Expand Down
25 changes: 13 additions & 12 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ release: release-server

release-server:
# Build server components release
mkdir server-$(PLUGINVER)
mkdir server-$(PLUGINVER)/recordings
cp server/recordings/readme.md server/recordings/fgcom.rec.testsample.fgcs server-$(PLUGINVER)/recordings
head -n 1 server/Readme.server.md > server-$(PLUGINVER)/README.md
@echo Version: $(VERSION) \($(GITVER) $(GITDATE)\) >> server-$(PLUGINVER)/README.md
tail +2 server/Readme.server.md >> server-$(PLUGINVER)/README.md
cp -r server/statuspage/ server-$(PLUGINVER)
mv server-$(PLUGINVER)/statuspage/Readme.statuspage.md server-$(PLUGINVER)
cp server/fgcom-botmanager.sh server/*.bot.lua server-$(PLUGINVER)
sed '/^\s\+gitver/s/""/"$(GITVER) $(GITDATE)"/' server/sharedFunctions.inc.lua > server-$(PLUGINVER)/sharedFunctions.inc.lua
zip -r server-$(PLUGINVER).zip server-$(PLUGINVER)
rm -rf server-$(PLUGINVER)
mkdir fgcom-mumble-server-$(PLUGINVER)
mkdir fgcom-mumble-server-$(PLUGINVER)/recordings
cp server/recordings/readme.md server/recordings/fgcom.rec.testsample.fgcs fgcom-mumble-server-$(PLUGINVER)/recordings
head -n 1 server/Readme.server.md > fgcom-mumble-server-$(PLUGINVER)/README.md
@echo Version: $(VERSION) \($(GITVER) $(GITDATE)\) >> fgcom-mumble-server-$(PLUGINVER)/README.md
tail +2 server/Readme.server.md >> fgcom-mumble-server-$(PLUGINVER)/README.md
cp -r server/statuspage/ fgcom-mumble-server-$(PLUGINVER)
mv fgcom-mumble-server-$(PLUGINVER)/statuspage/Readme.statuspage.md fgcom-mumble-server-$(PLUGINVER)
cp server/Readme.server-de_DE.md fgcom-mumble-server-$(PLUGINVER)/
cp server/fgcom-botmanager.sh server/*.bot.lua fgcom-mumble-server-$(PLUGINVER)
sed '/^\s\+gitver/s/""/"$(GITVER) $(GITDATE)"/' server/sharedFunctions.inc.lua > fgcom-mumble-server-$(PLUGINVER)/sharedFunctions.inc.lua
zip -r fgcom-mumble-server-$(PLUGINVER).zip fgcom-mumble-server-$(PLUGINVER)
rm -rf fgcom-mumble-server-$(PLUGINVER)

# relay everything else to the mumble-plugin makefile
.DEFAULT:
Expand Down

0 comments on commit 8c471c2

Please sign in to comment.