-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
59 lines (45 loc) · 1.56 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
FLAGS = -ldflags '-s -w'
.PHONY: test clean distclean
test:
go test -v ./...
clean:
rm -rf build
distclean: clean
rm -rf dist
# Note: packaging and building for Linux
# is done through build.snapcraft.io
prime/bash-complete.sh prime/zsh-complete.sh:
go run scripts/generate_completions.go
mkdir -p prime
mv *-complete.sh prime
build/windows/wrap.exe: cmd/wrap
go generate ./$<
GOARCH=amd64 GOOS=windows go build -o $@ $(FLAGS) ./$<
rm $</resource.syso
dist/Wrap_Win64_nightly.exe: build/windows/wrap.exe
mkdir -p dist
makensis -V2 -DARCH=x64 scripts/installer.nsi
build/darwin/wrap: cmd/wrap
GOARCH=amd64 GOOS=darwin go build -o $@ $(FLAGS) ./$<
dist/Wrap_macOS_nightly.zip: build/darwin/wrap
mkdir -p ./build/macOS/dist/wrap.app/Contents/MacOS
mkdir -p ./build/macOS/dist/wrap.app/Contents/Resources
cp scripts/Info.plist \
build/macOS/dist/wrap.app/Contents/
cp build/darwin/wrap \
build/macOS/dist/wrap.app/Contents/MacOS/
cp assets/wrap/wrap.icns \
build/macOS/dist/wrap.app/Contents/Resources/wrapApp.icns
cp assets/filetypes/wrap/wrap.icns \
build/macOS/dist/wrap.app/Contents/Resources/WRAP.icns
cp assets/filetypes/fountain/fountain.icns \
build/macOS/dist/wrap.app/Contents/Resources/FOUNTAIN.icns
mkdir -p dist
zip -q -r $@ build/macOS/dist/wrap.app
nightly: prime/bash-complete.sh prime/zsh-complete.sh \
dist/Wrap_Win64_nightly.exe dist/Wrap_macOS_nightly.zip
dist/Wrap_Win64.exe: dist/Wrap_Win64_nightly.exe
mv $< $@
dist/Wrap_macOS.zip: dist/Wrap_macOS_nightly.zip
mv $< $@
release: nightly dist/Wrap_Win64.exe dist/Wrap_macOS.zip