Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: 1.24.x
stable: true
go-version: 1.26.x

- run: go get -v -t -d ./...
- run: make VERSION=${GITHUB_REF/refs\/tags\/v/} clean build
Expand All @@ -36,20 +35,20 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- run: echo "DOCKER_BUILD_PUSH=true" >> $GITHUB_ENV

- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- uses: docker/login-action@v3
- uses: docker/setup-buildx-action@v4
- uses: docker/setup-qemu-action@v4
- uses: docker/login-action@v4
with:
registry: docker.io
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- uses: docker/login-action@v3
- uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Go environment
uses: actions/setup-go@v5
uses: actions/setup-go@v7
with:
go-version: 1.24.x
stable: true
go-version: 1.26.x

- name: Check out code into the Go module directory
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Get dependencies
run: go get -v -t -d ./...
Expand All @@ -21,7 +20,7 @@ jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- run: |
make PLATFORM=linux/amd64 build-docker-multiarch
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ LD_FLAGS ?= $(if $(VERSION),-X main.Version=${VERSION}) \
-X main.BuildDate=$(shell date "+%F-%T") \
-X main.Commit=${COMMIT}

ifdef GOTOOLCHAIN
GO_VERSION=$(GOTOOLCHAIN)
else
GO_VERSION=$(shell go mod edit -json | jq -r .Toolchain | sed -e 's/go//')
endif
GO_VERSION=$(shell go mod edit -json | jq -r .Toolchain | sed -e 's/go//')

build-docker-multiarch:
docker buildx build \
Expand Down
5 changes: 0 additions & 5 deletions command/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ func inputRawToken(gotify *api.GotifyREST) string {
for {
enteredToken := inputString("Application Token: ")

if len(enteredToken) != 15 {
fmt.Println("A application token must have a length of 15 characters")
hr()
continue
}
_, err := utils.SpinLoader("Validating", func(success chan interface{}, failure chan error) {
params := message.NewCreateMessageParams()
params.Body = &models.MessageExternal{
Expand Down
2 changes: 1 addition & 1 deletion command/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func doWatch(ctx *cli.Context) {
fmt.Fprint(msgData, output)
fmt.Fprintln(msgData, "== END NEW OUTPUT ==")
case "short":
fmt.Fprintf(msgData, output)
fmt.Fprint(msgData, output)
}

msgString := msgData.String()
Expand Down
69 changes: 40 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,43 +1,54 @@
module github.com/gotify/cli/v2

go 1.23
go 1.25.0

toolchain go1.24.1
toolchain go1.26.0

require (
github.com/adrg/xdg v0.4.0
github.com/go-openapi/runtime v0.28.0
github.com/adrg/xdg v0.5.3
github.com/go-openapi/runtime v0.32.5
github.com/gotify/go-api-client/v2 v2.0.4
github.com/tj/go-spin v1.1.0
golang.org/x/crypto v0.24.0
golang.org/x/crypto v0.54.0
gopkg.in/urfave/cli.v1 v1.20.0
)

require (
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-openapi/analysis v0.25.3 // indirect
github.com/go-openapi/errors v0.22.8 // indirect
github.com/go-openapi/jsonpointer v1.0.0 // indirect
github.com/go-openapi/jsonreference v1.0.0 // indirect
github.com/go-openapi/loads v0.24.0 // indirect
github.com/go-openapi/runtime/server-middleware v0.32.5 // indirect
github.com/go-openapi/spec v0.22.6 // indirect
github.com/go-openapi/strfmt v0.27.0 // indirect
github.com/go-openapi/swag v0.27.0 // indirect
github.com/go-openapi/swag/cmdutils v0.27.0 // indirect
github.com/go-openapi/swag/conv v0.27.0 // indirect
github.com/go-openapi/swag/fileutils v0.27.0 // indirect
github.com/go-openapi/swag/jsonname v0.27.0 // indirect
github.com/go-openapi/swag/jsonutils v0.27.0 // indirect
github.com/go-openapi/swag/loading v0.27.0 // indirect
github.com/go-openapi/swag/mangling v0.27.0 // indirect
github.com/go-openapi/swag/netutils v0.27.0 // indirect
github.com/go-openapi/swag/stringutils v0.27.0 // indirect
github.com/go-openapi/swag/typeutils v0.27.0 // indirect
github.com/go-openapi/swag/yamlutils v0.27.0 // indirect
github.com/go-openapi/validate v0.26.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
github.com/oklog/ulid/v2 v2.1.1 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/trace v1.44.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.57.0 // indirect
golang.org/x/sync v0.22.0 // indirect
golang.org/x/sys v0.47.0 // indirect
golang.org/x/term v0.45.0 // indirect
golang.org/x/text v0.40.0 // indirect
)
Loading
Loading