From b8b457abdb29681b7692cf4148c299e213445d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thi=20Do=C3=A3n?= Date: Thu, 25 Feb 2021 11:51:50 +0900 Subject: [PATCH] Build universal binaries for release (#1024) * Build universal binaries for release Closes https://github.com/yonaskolb/XcodeGen/issues/994. * Add a changelog entry for 'Build universal binaries for release' --- CHANGELOG.md | 3 +++ Makefile | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 257b2713..170b5170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ #### Fixed - Fixed regression on **.storekit** configuration files' default build phase. [#1026](https://github.com/yonaskolb/XcodeGen/pull/1026) @jcolicchio +#### Internal +- Build universal binaries for release. XcodeGen now runs natively on Apple Silicon. [#1024](https://github.com/yonaskolb/XcodeGen/pull/1024) @thii + ## 2.19.0 #### Added diff --git a/Makefile b/Makefile index 26afb1c3..846649f0 100644 --- a/Makefile +++ b/Makefile @@ -9,17 +9,18 @@ CURRENT_PATH = $(PWD) REPO = https://github.com/yonaskolb/$(TOOL_NAME) RELEASE_TAR = $(REPO)/archive/$(VERSION).tar.gz SHA = $(shell curl -L -s $(RELEASE_TAR) | shasum -a 256 | sed 's/ .*//') +SWIFT_BUILD_FLAGS = --disable-sandbox -c release --arch arm64 --arch x86_64 .PHONY: install build uninstall format_code brew release install: build mkdir -p $(PREFIX)/bin - cp -f .build/release/$(EXECUTABLE_NAME) $(INSTALL_PATH) + cp -f $(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(EXECUTABLE_NAME) $(INSTALL_PATH) mkdir -p $(SHARE_PATH) cp -R $(CURRENT_PATH)/SettingPresets $(SHARE_PATH)/SettingPresets build: - swift build --disable-sandbox -c release + swift build $(SWIFT_BUILD_FLAGS) uninstall: rm -f $(INSTALL_PATH)