dashboard / erock/git-pr / rename binaries #58 rss

accepted · opened on 2025-04-06T00:58:38Z by jolheiser
Help
checkout latest patchset:
ssh pr.pico.sh print pr-58 | git am -3
checkout any patchset in a patch request:
ssh pr.pico.sh print ps-X | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 58
add review to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add --review 58
accept PR:
ssh pr.pico.sh pr accept 58
close PR:
ssh pr.pico.sh pr close 58

Logs

jolheiser created pr with ps-118 on 2025-04-06T00:58:38Z
erock changed status on 2025-04-06T22:13:26Z {"status":"accepted"}

Patchsets

ps-118 by jolheiser on 2025-04-06T00:58:38Z

Patchset ps-118

rename binaries

jolheiser
2025-04-06T00:55:44Z
Caddyfile
+1 -1
Dockerfile
+5 -5
Makefile
+2 -2
Back to top

rename binaries

Rename the binaries to avoid any potential for "ssh" (or "web") binaries.
In particular, "ssh" could conflict with openssh and lead to confusing behavior.

Signed-off-by: jolheiser <git@jolheiser.com>
Caddyfile link
+1 -1
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
diff --git a/Caddyfile b/Caddyfile
index 297f914..ff096d2 100644
--- a/Caddyfile
+++ b/Caddyfile
@@ -48,6 +48,6 @@
 }
 
 :443 {
-	reverse_proxy web:3000
+	reverse_proxy git-web:3000
 	encode zstd gzip
 }
Dockerfile link
+5 -5
 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
diff --git a/Dockerfile b/Dockerfile
index b2b77a0..f0c14ec 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -22,7 +22,7 @@ ENV LDFLAGS="-s -w"
 
 ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
 
-RUN go build -ldflags "$LDFLAGS" -o /go/bin/web ./cmd/web
+RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-web ./cmd/git-web
 
 FROM builder-deps as builder-ssh
 
@@ -36,14 +36,14 @@ ENV LDFLAGS="-s -w"
 
 ENV GOOS=${TARGETOS} GOARCH=${TARGETARCH}
 
-RUN go build -ldflags "$LDFLAGS" -o /go/bin/ssh ./cmd/ssh
+RUN go build -ldflags "$LDFLAGS" -o /go/bin/git-ssh ./cmd/git-ssh
 
 FROM scratch as release-web
 
 WORKDIR /app
 
 COPY --from=builder-web /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
-COPY --from=builder-web /go/bin/web ./web
+COPY --from=builder-web /go/bin/git-web ./git-web
 
 CMD ["/app/web"]
 
@@ -53,6 +53,6 @@ WORKDIR /app
 ENV TERM="xterm-256color"
 
 COPY --from=builder-ssh /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
-COPY --from=builder-ssh /go/bin/ssh ./ssh
+COPY --from=builder-ssh /go/bin/git-ssh ./git-ssh
 
-CMD ["/app/ssh"]
+CMD ["/app/git-ssh"]
Makefile link
+2 -2
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
diff --git a/Makefile b/Makefile
index bf76b70..80e7ae4 100644
--- a/Makefile
+++ b/Makefile
@@ -21,8 +21,8 @@ snapshot:
 .PHONY: snapshot
 
 build:
-	go build -o ./build/ssh ./cmd/ssh
-	go build -o ./build/web ./cmd/web
+	go build -o ./build/git-ssh ./cmd/git-ssh
+	go build -o ./build/git-web ./cmd/git-web
 .PHONY: build
 
 bp-setup:
cmd/git-ssh/main.go link
+0 -0
1
2
3
4
diff --git a/cmd/ssh/main.go b/cmd/git-ssh/main.go
similarity index 100%
rename from cmd/ssh/main.go
rename to cmd/git-ssh/main.go
cmd/git-web/main.go link
+0 -0
1
2
3
4
diff --git a/cmd/web/main.go b/cmd/git-web/main.go
similarity index 100%
rename from cmd/web/main.go
rename to cmd/git-web/main.go
docker-compose.prod.yml link
+2 -2
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 4f11319..3195073 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -19,7 +19,7 @@ services:
       - "${GITPR_HTTPS_V6:-[::1]:443}:443"
       - "${GITPR_HTTP_V6:-[::1]:80}:80"
   web:
-    command: "/app/web --config ${GITPR_CONFIG_PATH}"
+    command: "/app/git-web --config ${GITPR_CONFIG_PATH}"
     networks:
       git:
         aliases:
@@ -27,7 +27,7 @@ services:
     env_file:
       - .env.prod
   ssh:
-    command: "/app/ssh --config ${GITPR_CONFIG_PATH}"
+    command: "/app/git-ssh --config ${GITPR_CONFIG_PATH}"
     networks:
       git:
         aliases: