-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
33 lines (24 loc) · 775 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.DEFAULT_GOAL := build
VERSION = $(shell git describe --always --tags --dirty)
VERSION_FILE = Sources/ArenaCore/Version.swift
XCODE = /Applications/Xcode_13.4.1.app
clean:
swift package clean
force-clean:
rm -rf .build
build: version
env DEVELOPER_DIR=$(XCODE) xcrun swift build
build-release:
env DEVELOPER_DIR=$(XCODE) xcrun swift build -c release --disable-sandbox
test:
env DEVELOPER_DIR=$(XCODE) xcrun swift test
release: version build-release
install: release
install .build/release/arena /usr/local/bin/
@# reset version file
@git checkout $(VERSION_FILE)
version:
@# avoid tracking changes for file:
@git update-index --assume-unchanged $(VERSION_FILE)
@echo VERSION: $(VERSION)
@echo "public let ArenaVersion = \"$(VERSION)\"" > $(VERSION_FILE)