-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
156 lines (130 loc) · 3.81 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.DEFAULT_GOAL := help
PROXY_IP ?= 127.0.0.1
PROXY_PORT ?= 6060
.PHONY: run
run: gosh-ubuntu
cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q -c hack/Gosh.yaml
.PHONY: run-fail
run-fail: gosh-ubuntu
cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q -c hack/Gosh.fail_test.yaml
.PHONY: run-url
run-url: gosh-ubuntu
cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q gosh://0:0d5c05d7a63f438b57ede179b7110d3e903f5be3b5f543d3d6743d774698e92c/awnion/telepresence-gosh
.PHONY: debug
debug: gosh-ubuntu
GOSH_LOG=info,gosh_builder=debug cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q -c hack/Gosh.yaml
.PHONY: debug-url
debug-url: gosh-ubuntu
GOSH_LOG=info,gosh_builder=debug cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q gosh://0:0d5c05d7a63f438b57ede179b7110d3e903f5be3b5f543d3d6743d774698e92c/awnion/telepresence-gosh
.PHONY: trace
trace: gosh-ubuntu
GOSH_LOG=info,gosh_builder=trace cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q -c hack/Gosh.yaml
.PHONY: trace-url
trace-url: gosh-ubuntu
GOSH_LOG=info,gosh_builder=trace cargo run --bin gosh -- build -s ${PROXY_IP}:${PROXY_PORT} -q gosh://0:0d5c05d7a63f438b57ede179b7110d3e903f5be3b5f543d3d6743d774698e92c/awnion/telepresence-gosh
.PHONY: gosh-ubuntu
gosh-ubuntu: pb
docker buildx build \
--build-arg BRANCH=dev \
--tag gosh-ubuntu \
--file images/ubuntu/Dockerfile \
.
.PHONY: gosh-rust
gosh-rust: pb
docker buildx build \
--tag gosh-rust \
--file images/rust/Dockerfile \
.
.PHONY: gosh-ubuntu-push
gosh-ubuntu-push: pb
docker buildx build \
--no-cache \
--build-arg BRANCH=dev \
--tag awnion/gosh-ubuntu \
--tag awnion/gosh-ubuntu:22.04 \
--file images/ubuntu/Dockerfile \
--push \
.
.PHONY: gosh-git-server
gosh-git-server:
docker buildx build \
--tag gosh-git-server \
--file images/git-server/Dockerfile \
.
.PHONY: gosh-git-server
gosh-git-server-debug: gosh-git-server
docker run --rm -ti -p 8080:8080 -e GOSH_LOG=debug gosh-git-server
.PHONY: gosh-git-server-push
gosh-git-server-push:
docker buildx build \
--tag awnion/gosh-git-server \
--file images/git-server/Dockerfile \
--push \
.
.PHONY: gosh-git-server-release
gosh-git-server-release:
docker buildx build \
--tag teamgosh/gosh-git-server \
--file images/git-server/Dockerfile \
--push \
.
.PHONY: gosh-rust-push
gosh-rust-push: pb
docker buildx build \
--no-cache \
--tag awnion/gosh-rust \
--file images/rust/Dockerfile \
--push \
.
.PHONY: gosh-ubuntu-release
gosh-ubuntu-release: pb
docker buildx build \
--no-cache \
--build-arg BRANCH=dev \
--tag teamgosh/gosh-ubuntu:22.04 \
--tag teamgosh/gosh-ubuntu:latest \
--file images/ubuntu/Dockerfile \
--push \
.
.PHONY: gosh-rust-release
gosh-rust-release: pb
docker buildx build \
--no-cache \
--tag teamgosh/gosh-rust:1.70-bookworm \
--tag teamgosh/gosh-rust:latest \
--file images/rust/Dockerfile \
--push \
.
.PHONY: gosh-golang-release
gosh-golang-release: pb
docker buildx build \
--no-cache \
--tag teamgosh/gosh-golang:1.20.4-bullseye \
--tag teamgosh/gosh-golang:latest \
--file images/go/Dockerfile \
--push \
.
.PHONY: pb
pb:
cd gosh-builder-grpc-api && cargo build
.PHONY: clear
clear:
rm -rf ./sbom.*
.PHONY: fmt
fmt:
taplo fmt
cargo fmt --all
.PHONY: init
init:
cargo run --bin gosh init
.PHONY: install
install:
cd gosh && cargo install -f --path .
cd git-server && cargo install -f --path .
.PHONY: dev-install ## fast builds for debug
dev-install:
cd gosh && cargo install --profile dev -f --path .
cd git-server && cargo install --profile dev -f --path .
.PHONY: test-build
test-build:
GOSH_LOG=debug cargo run --bin gosh -- build gosh://0:b00a7a5a24740e4a7d6487d31969732f1febcaea412df5cc307400818055ad58/gosh-team/anytree-test-project#290e83d435be7a783a6bd6b204454bf6da1d17f3:./