Skip to content

Commit

Permalink
Merge pull request #1212 from ripienaar/0_1_6
Browse files Browse the repository at this point in the history
Prepare release 0.1.6
  • Loading branch information
ripienaar authored Dec 23, 2024
2 parents 74fd7c7 + 32f978a commit d171625
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 84 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:
repositories: "homebrew-nats-tools"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
version: latest
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_APP_TOKEN: ${{ steps.token.outputs.token }}
GITHUB_APP_TOKEN: ${{ steps.token.outputs.token }}
11 changes: 4 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
test:
strategy:
matrix:
go: [ "1.21", "1.22" ]
go: [ "1.22", "1.23" ]

env:
GOPATH: /home/runner/work/natscli
Expand Down Expand Up @@ -36,18 +36,15 @@ jobs:
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
PATH=$PATH:$GOPATH/bin
GO_LIST=$(go list ./...)
GO_LIST=$(go list ./... | grep -F -e asciigraph -v)
$(exit $(go fmt $GO_LIST | wc -l))
go vet -composites=false $GO_LIST
find . -type f -name "*.go" | xargs misspell -error -locale US
find . -type f -name "*.go" | grep -F -e asciigraph -v | xargs misspell -error -locale US
staticcheck -f stylish $GO_LIST
- name: Run tests
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
set -e
cd nats
go test -v --failfast -p=1 ./...
cd ../cli
go test -v --failfast -p=1 ./...
go list ./... | grep -F -e asciigraph -v | xargs go test -v --failfast -p=1
set +e
11 changes: 7 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
project_name: natscli
version: 2

release:
github:
owner: nats-io
name: natscli
name_template: "Release {{.Version}}"
draft: true
prerelease: auto

changelog:
skip: true
disable: true

builds:
- main: ./nats
Expand Down Expand Up @@ -53,14 +55,15 @@ checksum:

brews:
- name: nats
folder: Formula
directory: Formula
repository:
owner: nats-io
name: homebrew-nats-tools
token: "{{ .Env.GITHUB_APP_TOKEN }}"
url_template: "https://github.com/nats-io/natscli/releases/download/{{ .Tag }}/nats-{{.Version}}-{{ .Os }}-{{ .Arch }}{{if .Arm}}{{.Arm}}{{end}}.zip"
homepage: "https://github.com/nats-io/nats"
homepage: "https://github.com/nats-io/natscli"
description: "NATS utility"
skip_upload: false
skip_upload: auto
test: |
system "#{bin}/nats --version"
install: |
Expand Down
2 changes: 1 addition & 1 deletion cli/account_tls_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *ActTLSCmd) showTLS(_ *fisk.ParseContext) error {

var showingOCSP bool
if c.wantOCSP {
if t.OCSPResponse != nil && len(t.OCSPResponse) > 0 {
if len(t.OCSPResponse) > 0 {
showingOCSP = true
} else {
fmt.Printf("# No OCSP Response found in TLS connection\n\n")
Expand Down
3 changes: 2 additions & 1 deletion cli/errors_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"encoding/json"
"errors"
"fmt"
"os"
"os/exec"
Expand Down Expand Up @@ -299,7 +300,7 @@ func (c *errCmd) validateErr(err *server.ErrorsData) error {
}

if len(errs) > 0 {
return fmt.Errorf(f(errs))
return errors.New(f(errs))
}

return nil
Expand Down
44 changes: 22 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
module github.com/nats-io/natscli

go 1.21
go 1.22.0

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/HdrHistogram/hdrhistogram-go v1.1.2
github.com/choria-io/fisk v0.6.2
github.com/choria-io/fisk v0.6.4
github.com/dustin/go-humanize v1.0.1
github.com/emicklei/dot v1.6.2
github.com/emicklei/dot v1.6.4
github.com/expr-lang/expr v1.16.9
github.com/fatih/color v1.17.0
github.com/fatih/color v1.18.0
github.com/ghodss/yaml v1.0.0
github.com/google/go-cmp v0.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/gosuri/uiprogress v0.0.1
github.com/guptarohit/asciigraph v0.7.1
github.com/jedib0t/go-pretty/v6 v6.5.9
github.com/guptarohit/asciigraph v0.7.3
github.com/jedib0t/go-pretty/v6 v6.6.5
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/klauspost/compress v1.17.9
github.com/klauspost/compress v1.17.11
github.com/mattn/go-isatty v0.0.20
github.com/nats-io/jsm.go v0.1.2
github.com/nats-io/jwt/v2 v2.5.8
github.com/nats-io/nats-server/v2 v2.10.18
github.com/nats-io/nats.go v1.36.0
github.com/nats-io/nkeys v0.4.7
github.com/nats-io/jwt/v2 v2.7.3
github.com/nats-io/nats-server/v2 v2.10.24
github.com/nats-io/nats.go v1.38.0
github.com/nats-io/nkeys v0.4.9
github.com/nats-io/nuid v1.0.1
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.55.0
github.com/prometheus/client_golang v1.20.5
github.com/prometheus/common v0.61.0
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
github.com/tylertreat/hdrhistogram-writer v0.0.0-20210816161836-2e440612a39f
golang.org/x/crypto v0.25.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/term v0.22.0
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/term v0.27.0
gopkg.in/yaml.v3 v3.0.1
)

Expand All @@ -40,17 +40,17 @@ require (
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/gosuri/uilive v0.0.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/minio/highwayhash v1.0.3 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.8.0 // indirect
google.golang.org/protobuf v1.36.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit d171625

Please sign in to comment.