-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (49 loc) · 1.33 KB
/
Makefile
File metadata and controls
62 lines (49 loc) · 1.33 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
SWIFT_PACKAGE_VERSION := $(shell swift package tools-version)
# Delete package build artifacts.
.PHONY: clean
clean:
swift package clean
# Lint fix and format code.
.PHONY: lint-fix
lint-fix:
swiftlint --fix --quiet
swiftformat --quiet --swiftversion ${SWIFT_PACKAGE_VERSION} .
.PHONY: pre-push
pre-push: genLinuxTests update-fileheaders lint-fix
# Build debug version
.PHONY: build-debug
build-debug:
swift build -c debug
# Build release version
.PHONY: build-release
build-release:
swift build -c release --skip-update
# Reset the complete cache/build directory and Package.resolved files
.PHONY: reset
swift package reset
-rm Package.resolved
-rm rdf *.xcworkspace/xcshareddata/swiftpm/Package.resolved
-rm -rdf .swiftpm/xcode/*
.PHONY: resolve
resolve:
swift package resolve
.PHONY: open-proj-xcode
open-proj-xcode:
open -b com.apple.dt.Xcode Package.swift
.PHONY: open-proj-vscode
open-proj-vscode:
code .
.PHONY: setup-brew
setup-brew:
@which -s brew || /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@brew update
.PHONY: test
test:
swift test -v --skip-update --enable-test-discovery
.PHONY: genLinuxTests
genLinuxTests:
swift test --generate-linuxmain
swiftlint --fix --format --path Tests/
.PHONY: update-fileheaders
update-fileheaders:
Scripts/update-fileheaders.sh