Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
SWIFT_BUILD_FLAGS=-Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.12"
BUILD_FLAGS=-Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.12"
RELEASE_BUILD_FLAGS=$(BUILD_FLAGS) -c release -Xswiftc -static-stdlib --disable-sandbox
RELEASE_EXECUTABLE=$(shell swift build $(RELEASE_BUILD_FLAGS) --show-bin-path)/periphery

.PHONY: all $(MAKECMDGOALS)

all: build

build:
@swift build $(SWIFT_BUILD_FLAGS)
@swift build $(BUILD_FLAGS)

release:
@swift build -c release -Xswiftc -static-stdlib $(SWIFT_BUILD_FLAGS)
build_release:
@swift build $(RELEASE_BUILD_FLAGS)

proj: build
@rm -rf Periphery.xcodeproj
Expand All @@ -20,4 +22,8 @@ lint:
@swiftlint lint --quiet

test:
@set -o pipefail && swift test $(SWIFT_BUILD_FLAGS) 2>&1 | bundle exec xcpretty -tc
@set -o pipefail && swift test $(BUILD_FLAGS) 2>&1 | bundle exec xcpretty -tc

install: build_release
install -d "$(PREFIX)/bin/"
install "$(RELEASE_EXECUTABLE)" "$(PREFIX)/bin/"
2 changes: 1 addition & 1 deletion scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ git push origin master
git push origin ${version}

rm -rf .build/release/periphery
make release
make build_release
rm -rf .release
mkdir .release
cp .build/release/periphery .release/
Expand Down