Skip to content

Commit

Permalink
New version prompting
Browse files Browse the repository at this point in the history
Check if there is a new version of the CLI, at most once an hour, and
display a notification to the user if there is a new version.
  • Loading branch information
dadgar committed May 22, 2024
1 parent 28b52de commit 16748f0
Show file tree
Hide file tree
Showing 11 changed files with 852 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ packages:
outpkg: "mock_{{.PackageName}}"
all: true
recursive: true
github.com/hashicorp/hcp/internal/pkg/api/releasesapi/client:
config:
dir: "internal/pkg/api/releasesapi/mocks"
outpkg: "mock_{{.PackageName}}"
all: true
recursive: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ROOT_DIR = $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
# the mock file is generated in the same package as the actual implementation,
# store the mock file in MOCKERY_OUTPUT_FILES.
MOCKERY_DIRS=./ internal/commands/auth/ internal/pkg/api/iampolicy
MOCKERY_OUTPUT_DIRS=internal/pkg/api/mocks internal/commands/auth/mocks
MOCKERY_OUTPUT_DIRS=internal/pkg/api/mocks internal/commands/auth/mocks internal/pkg/api/releasesapi/mocks
MOCKERY_OUTPUT_FILES=internal/pkg/api/iampolicy/mock_setter.go \
internal/pkg/api/iampolicy/mock_resource_updater.go

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/go-openapi/strfmt v0.23.0
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hcl/v2 v2.19.1
github.com/hashicorp/hcp-sdk-go v0.92.0
github.com/lithammer/dedent v1.1.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI=
github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE=
github.com/hashicorp/hcp-sdk-go v0.92.0 h1:0D429tlRozQoOjxQOSgaodNUhglhcjTg9n25vWDhkAo=
Expand Down
69 changes: 69 additions & 0 deletions internal/pkg/api/releasesapi/mocks/mock_ClientOption.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

288 changes: 288 additions & 0 deletions internal/pkg/api/releasesapi/mocks/mock_ClientService.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16748f0

Please sign in to comment.