File tree 1 file changed +21
-4
lines changed 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
+
1
12
SWIFTC_FLAGS = -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.13"
13
+
2
14
CONFIGURATION = debug
3
15
4
16
debug : build
5
17
6
- release : CONFIGURATION = release
7
- release : SWIFTC_FLAGS += --static-swift-stdlib
8
- release : clean build
18
+ release :
19
+ @echo $(SHA )
9
20
10
21
build :
11
22
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 )
12
29
13
30
test :
14
31
swift test $(SWIFTC_FLAGS )
19
36
clean :
20
37
swift package clean
21
38
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