Skip to content

Commit

Permalink
Update go version and update pubsub features
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed Oct 2, 2024
1 parent d1ea229 commit 03091f8
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23
- name: Checkout repo
uses: actions/checkout@v3
- name: Lint the codebase
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: 1.22
go-version: 1.23
- name: install pgit
run: |
go install github.com/picosh/pgit@v1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.22 AS builder-deps
FROM --platform=$BUILDPLATFORM golang:1.23 AS builder-deps
LABEL maintainer="Pico Maintainers <[email protected]>"

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pico-plus:

scripts:
# might need to set MINIO_URL
docker run --rm -it --env-file .env -v $(shell pwd):/app -w /app golang:1.22 /bin/bash
docker run --rm -it --env-file .env -v $(shell pwd):/app -w /app golang:1.23 /bin/bash
.PHONY: scripts

fmt:
Expand Down
2 changes: 1 addition & 1 deletion bouncer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine AS builder
FROM golang:1.23-alpine AS builder

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion dev.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## development

- `golang` >= 1.22.0
- `golang` >= 1.23.1
- `direnv` to load environment vars

```bash
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ require (
github.com/muesli/termenv v0.15.3-0.20240509142007-81b8f94111d5
github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a
github.com/picosh/pubsub v0.0.0-20241002203517-3ff0e5744b44
github.com/picosh/pubsub v0.0.0-20241002213216-242caa6020e9
github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc
github.com/picosh/tunkit v0.0.0-20240709033345-8315d4f3cd0e
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ github.com/picosh/go-rsync-receiver v0.0.0-20240709135253-1daf4b12a9fc h1:bvcsoO
github.com/picosh/go-rsync-receiver v0.0.0-20240709135253-1daf4b12a9fc/go.mod h1:i0iR3W4GSm1PuvVxB9OH32E5jP+CYkVb2NQSe0JCtlo=
github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a h1:Cr1xODiyd/SjjBRtYA9VX6Do3D+w+DansQzkb4NGeyA=
github.com/picosh/pobj v0.0.0-20240709135546-27097077b26a/go.mod h1:VIkR1MZBvxSK2OO47jikxikAO/sKb/vTmXX5ZuYTIvo=
github.com/picosh/pubsub v0.0.0-20241002203517-3ff0e5744b44 h1:XNty1ovgt4r7WNydALjLIEKdlACit1X4qsYpktgzUlQ=
github.com/picosh/pubsub v0.0.0-20241002203517-3ff0e5744b44/go.mod h1:iuxAenTRpwThFkOJNw5Sumgv0FewjceHrl/4cHKkMe4=
github.com/picosh/pubsub v0.0.0-20241002213216-242caa6020e9 h1:rm5eAdIC4nY8u9B6/C+lB5PYqWpTK0xGjId8Fl9Cg30=
github.com/picosh/pubsub v0.0.0-20241002213216-242caa6020e9/go.mod h1:iuxAenTRpwThFkOJNw5Sumgv0FewjceHrl/4cHKkMe4=
github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc h1:IIsJuAFG2ju3cygKVKTIsYYZf21q5S3Dr1H4fGbfgJg=
github.com/picosh/send v0.0.0-20240820031602-5d3b1a4494cc/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0 h1:pBRIbiCj7K6rGELijb//dYhyCo8A3fvxW5dijrJVtjs=
Expand Down
2 changes: 1 addition & 1 deletion imgs/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
} else if cmd == "sub" {
err = pubsub.PubSub.Sub(sesh.Context(), uuid.NewString(), sesh, []*psub.Channel{
psub.NewChannel(fmt.Sprintf("%s/%s", user.Name, repoName)),
})
}, false)

if err != nil {
wish.Errorln(sesh, err)
Expand Down
4 changes: 3 additions & 1 deletion pubsub/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
cmdArgs = args[2:]
}
logger.Info(
"imgs middleware detected command",
"pubsub middleware detected command",
"args", args,
"cmd", cmd,
"channelName", channelName,
Expand Down Expand Up @@ -307,6 +307,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
} else if cmd == "sub" {
pubCmd := flagSet("pub", sesh)
public := pubCmd.Bool("p", false, "Subscribe to a public channel")
keepAlive := pubCmd.Bool("k", false, "Keep the sub alive even after the pub as died")
if !flagCheck(pubCmd, channelName, cmdArgs) {
return
}
Expand All @@ -324,6 +325,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
[]*psub.Channel{
psub.NewChannel(name),
},
*keepAlive,
)

if err != nil {
Expand Down

0 comments on commit 03091f8

Please sign in to comment.