-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (70 loc) · 2.29 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
include linux/packaging/Makefile.distros
.PHONY: build
build: linux/components
$(MAKE) linux/ubuntu
$(MAKE) windows
.PHONY: clean
clean:
$(MAKE) --directory linux clean
$(MAKE) --directory windows clean
.PHONY: purge
purge: clean
$(MAKE) --directory linux purge
$(MAKE) --directory windows purge
.PHONY: install
install:
sudo apt update
sudo apt install --yes --install-recommends \
equivs \
lcab \
openssh-client \
python3-paramiko \
rsync \
ubuntu-dev-tools
$(MAKE) --directory linux/packaging install
.PHONY: linux/binaries
linux/binaries:
$(MAKE) --directory linux/packaging ubuntu PACKAGE_BINARY=true
.PHONY: linux/debian
.SILENT: linux/debian
linux/debian:
for DISTRO in $(DEBIAN_VERSIONS); do \
test -z "$$TRAVIS" || echo "travis_fold:start:$$DISTRO"; \
echo "\033[36mBuilding $$DISTRO\033[0m"; \
$(MAKE) --directory linux/packaging $$DISTRO; \
test -z "$$TRAVIS" || echo "travis_fold:end:$$DISTRO"; \
done
.PHONY: linux/components
.SILENT: linux/components
linux/components:
test -z "$$TRAVIS" || echo "travis_fold:start:linux_components"
echo "\033[36mBuilding linux components\033[0m"
$(MAKE) --directory linux/components archive ARCHIVE=/dev/null
test -z "$$TRAVIS" || echo "travis_fold:end:linux_components"
.PHONY: linux/ubuntu
.SILENT: linux/ubuntu
linux/ubuntu:
for DISTRO in $(UBUNTU_VERSIONS); do \
test -z "$$TRAVIS" || echo "travis_fold:start:$$DISTRO"; \
echo "\033[36mBuilding $$DISTRO\033[0m"; \
$(MAKE) --directory linux/packaging $$DISTRO; \
test -z "$$TRAVIS" || echo "travis_fold:end:$$DISTRO"; \
done
.PHONY: windows
.SILENT: windows
windows:
test -z "$$TRAVIS" || echo "travis_fold:start:windows"
echo "\033[36mBuilding windows shims\033[0m"
$(MAKE) --directory windows shims
test -z "$$TRAVIS" || echo "travis_fold:end:windows"
.PHONY: version
.SILENT: version
version:
git tag --list --sort '-creatordate:raw' | awk '{ sub(/^v/, "", $$0); exit } END { sub(/^$$/, "1.0", $$0); print "v"$$0 }'
.PHONY: version++
.SILENT: version++
version++:
git tag --list --sort '-creatordate:raw' | awk '{ sub(/^v/, "", $$0); exit } END { sub(/^$$/, "1.0", $$0); printf "v%0.1f\n", $$0 + 0.1 }'
.PHONY: release
release:
git tag --force $${SIGNATURE_REFERENCE:+--sign} $${SIGNATURE_REFERENCE:+--local-user=}$${SIGNATURE_REFERENCE} --message '' $(shell make version++)