forked from mono0926/LicensePlist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (25 loc) · 784 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
34
PREFIX?=/usr/local
TEMPORARY_FOLDER=./tmp_portable_licenseplist
build:
swift build --disable-sandbox -c release
# For CocoaPods distribution
# Works only on Xcode 10.1(Swift 4.2) or earlier
build_legacy:
swift build --disable-sandbox -c release -Xswiftc -static-stdlib
test:
swift test
lint:
swiftlint
clean:
swift package clean
xcode:
swift package generate-xcodeproj
install: build
mkdir -p "$(PREFIX)/bin"
cp -f ".build/release/license-plist" "$(PREFIX)/bin/license-plist"
portable_zip: build_legacy
mkdir -p "$(TEMPORARY_FOLDER)"
cp -f ".build/release/license-plist" "$(TEMPORARY_FOLDER)/license-plist"
cp -f "LICENSE" "$(TEMPORARY_FOLDER)"
(cd $(TEMPORARY_FOLDER); zip -r - LICENSE license-plist) > "./portable_licenseplist.zip"
rm -r "$(TEMPORARY_FOLDER)"