add individual platform packaging targets (#8366)

Этот коммит содержится в:
Chris
2018-02-26 01:48:56 -06:00
коммит произвёл Joram Wilander
родитель 838295f82c
Коммит f0f4f68def
2 изменённых файлов: 7 добавлений и 9 удалений

Просмотреть файл

@@ -1,4 +1,4 @@
.PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows internal-test-web-client vet run-server-for-web-client-tests .PHONY: build package run stop run-client run-server stop-client stop-server restart restart-server restart-client start-docker clean-dist clean nuke check-style check-client-style check-server-style check-unit-tests test dist setup-mac prepare-enteprise run-client-tests setup-run-client-tests cleanup-run-client-tests test-client build-linux build-osx build-windows package-common package-linux package-osx package-windows internal-test-web-client vet run-server-for-web-client-tests
ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))

Просмотреть файл

@@ -20,9 +20,7 @@ build-client:
cd $(BUILD_WEBAPP_DIR) && $(MAKE) build cd $(BUILD_WEBAPP_DIR) && $(MAKE) build
package: package-common:
@ echo Packaging mattermost
@# Remove any old files @# Remove any old files
rm -Rf $(DIST_ROOT) rm -Rf $(DIST_ROOT)
@@ -59,9 +57,7 @@ endif
cp NOTICE.txt $(DIST_PATH) cp NOTICE.txt $(DIST_PATH)
cp README.md $(DIST_PATH) cp README.md $(DIST_PATH)
@# ----- PLATFORM SPECIFIC ----- package-osx: package-common
@# Make osx package
@# Copy binary @# Copy binary
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64") ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
@@ -73,7 +69,7 @@ endif
@# Cleanup @# Cleanup
rm -f $(DIST_PATH)/bin/platform rm -f $(DIST_PATH)/bin/platform
@# Make windows package package-windows: package-common
@# Copy binary @# Copy binary
ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64") ifeq ($(BUILDER_GOOS_GOARCH),"windows_amd64")
cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform.exe $(DIST_PATH)/bin # from native bin dir, not cross-compiled
@@ -85,7 +81,7 @@ endif
@# Cleanup @# Cleanup
rm -f $(DIST_PATH)/bin/platform.exe rm -f $(DIST_PATH)/bin/platform.exe
@# Make linux package package-linux: package-common
@# Copy binary @# Copy binary
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64") ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled cp $(GOPATH)/bin/platform $(DIST_PATH)/bin # from native bin dir, not cross-compiled
@@ -96,3 +92,5 @@ endif
tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost tar -C dist -czf $(DIST_PATH)-$(BUILD_TYPE_NAME)-linux-amd64.tar.gz mattermost
@# Don't clean up native package so dev machines will have an unzipped package available @# Don't clean up native package so dev machines will have an unzipped package available
@#rm -f $(DIST_PATH)/bin/platform @#rm -f $(DIST_PATH)/bin/platform
package: package-linux package-windows package-osx