-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
111 lines (83 loc) · 2.59 KB
/
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
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
install:
make build-project
cp bin/guaka ~/bin/guaka
test:
bash scripts/test.sh
install-swift:
eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"
test-darwin:
xcodebuild -project guaka-cli.xcodeproj -scheme guaka-cli build test
test-linux:
swift test
coverage:
slather coverage guaka-cli.xcodeproj
generate:
swift package generate-xcodeproj --enable-code-coverage
clean-darwin:
rm -rf bin/darwin
rm -rf release/darwin
clean-linux:
rm -rf bin/linux
rm -rf release/linux
clean:
rm -rf .build
make clean-darwin
make clean-linux
build-project:
swift build -Xswiftc -static-stdlib
build-project-darwin:
mkdir -p bin/darwin
make build-project
cp ./.build/debug/guaka-cli bin/darwin/guaka
@echo "\nDarwin version built at bin/darwin/guaka\n"
build-project-linux:
mkdir -p bin/linux
make build-project
cp -f ./.build/debug/guaka-cli bin/linux/guaka
release-darwin:
bash scripts/release-darwin.sh
release-darwin-local:
rm -rf .build
make build-project-darwin
bash scripts/release-darwin.sh
release-linux:
bash scripts/release-linux.sh
release-linux-local:
rm -rf .build
make clean-linux
make build-project-linux
publish-local-darwin:
bash scripts/publish-homebrew-mac.sh
build-linux-docker:
@echo "Runs release-linux-local inside a docker image"
@echo "The built file is located at bin/linux/guaka"
docker-compose run -w /work swift
@echo "\nLinux version built at bin/linux/guaka\n"
build-all-local: clone-swiftline clean build-linux-docker build-project-darwin
@echo "Binaries built at bin/\n"
release-local:
make build-all-local
@echo "Starting the github release for version ${VERSION}/\n"
bash scripts/github-release.sh
@echo "Upload darwin binary\n"
bash scripts/release-darwin.sh
@echo "Upload linux binary\n"
bash scripts/release-linux.sh
publish-local:
make publish-local-darwin
release-publish-local:
make release-local
make publish-local
clone-swiftline:
@echo "Removing old Swiftline"
@echo ""
rm -rf SwiftLineTemp
@echo "Clone new Swiftline from oarrabi/linux! branch"
git clone -b oarrabi/linux! https://github.com/oarrabi/Swiftline.git SwiftLineTemp
mv SwiftLineTemp/Sources/*.* Sources/Swiftline/
rm -rf SwiftLineTemp
release-and-deploy:
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make build-project-darwin release-darwin VERSION=${TRAVIS_TAG} GITHUB_TOKEN=${GITHUB_TOKEN} ; fi
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make build-project-linux release-linux VERSION=${TRAVIS_TAG} GITHUB_TOKEN=${GITHUB_TOKEN} ; fi
sha256:
@shasum -a 256 bin/guaka | cut -f 1 -d " "