File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1+ TOOL_NAME = stringray
2+ VERSION = 0.1.0
3+
4+ REPO = https://github.com/g-Off/$(TOOL_NAME )
5+ RELEASE_TAR = $(REPO ) /archive/$(VERSION ) .tar.gz
6+ SHA = $(shell curl -L -s $(RELEASE_TAR ) | shasum -a 256 | sed 's/ .* //')
7+
8+ PREFIX = /usr/local
9+ INSTALL_PATH = $(PREFIX ) /bin/$(TOOL_NAME )
10+ BUILD_PATH = $(shell swift build --show-bin-path -c $(CONFIGURATION ) ) /$(TOOL_NAME )
11+
112SWIFTC_FLAGS = -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.13"
13+
214CONFIGURATION = debug
315
416debug : build
517
6- release : CONFIGURATION = release
7- release : SWIFTC_FLAGS += --static-swift-stdlib
8- release : clean build
18+ release :
19+ @echo $(SHA )
920
1021build :
1122 swift build --configuration $(CONFIGURATION ) $(SWIFTC_FLAGS )
23+
24+ install : CONFIGURATION = release
25+ install : SWIFTC_FLAGS += --static-swift-stdlib --disable-sandbox
26+ install : clean build
27+ mkdir -p $(PREFIX ) /bin
28+ cp -f $(BUILD_PATH ) $(INSTALL_PATH )
1229
1330test :
1431 swift test $(SWIFTC_FLAGS )
1936clean :
2037 swift package clean
2138
22- .PHONY : debug release build test xcode clean
39+ .PHONY : debug release build test xcode clean install
You can’t perform that action at this time.
0 commit comments