Skip to content

Commit b10437f

Browse files
authored
Merge pull request #10 from firehydrant/update_everything
Add dependabot, update to current golang and api version
2 parents deab3c6 + adaf549 commit b10437f

File tree

8 files changed

+124
-98
lines changed

8 files changed

+124
-98
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version: 2
1+
version: 2.1
22
jobs:
33
release:
44
docker:
5-
- image: circleci/golang:1.11
5+
- image: circleci/golang:1.24.1
66
working_directory: /go/src/github.com/firehydrant/fhcli
77
steps:
88
- checkout

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
fhcli
22
dist/
33
config.yml
4+
.DS_Store

go.mod

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
module github.com/firehydrant/fhcli
22

3-
go 1.19
3+
go 1.24.1
44

55
require (
6-
github.com/firehydrant/api-client-go v0.0.0-20190226212857-d3f5f8fd67b3
7-
github.com/go-openapi/strfmt v0.21.7
6+
github.com/firehydrant/api-client-go v0.0.0-20250416195931-2c92272bebd1
7+
github.com/go-openapi/strfmt v0.23.0
88
gopkg.in/urfave/cli.v1 v1.20.0
99
gopkg.in/yaml.v2 v2.4.0
1010
)
1111

1212
require (
13-
github.com/BurntSushi/toml v0.3.1 // indirect
13+
github.com/BurntSushi/toml v1.5.0 // indirect
1414
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
15-
github.com/go-logr/logr v1.2.3 // indirect
15+
github.com/go-logr/logr v1.4.3 // indirect
1616
github.com/go-logr/stdr v1.2.2 // indirect
17-
github.com/go-openapi/analysis v0.21.4 // indirect
18-
github.com/go-openapi/errors v0.20.3 // indirect
19-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
20-
github.com/go-openapi/jsonreference v0.20.2 // indirect
21-
github.com/go-openapi/loads v0.21.2 // indirect
22-
github.com/go-openapi/runtime v0.26.0 // indirect
23-
github.com/go-openapi/spec v0.20.9 // indirect
24-
github.com/go-openapi/swag v0.22.3 // indirect
25-
github.com/go-openapi/validate v0.22.1 // indirect
17+
github.com/go-openapi/analysis v0.23.0 // indirect
18+
github.com/go-openapi/errors v0.22.1 // indirect
19+
github.com/go-openapi/jsonpointer v0.21.1 // indirect
20+
github.com/go-openapi/jsonreference v0.21.0 // indirect
21+
github.com/go-openapi/loads v0.22.0 // indirect
22+
github.com/go-openapi/runtime v0.28.0 // indirect
23+
github.com/go-openapi/spec v0.21.0 // indirect
24+
github.com/go-openapi/swag v0.23.1 // indirect
25+
github.com/go-openapi/validate v0.24.0 // indirect
26+
github.com/google/uuid v1.6.0 // indirect
2627
github.com/josharian/intern v1.0.0 // indirect
27-
github.com/mailru/easyjson v0.7.7 // indirect
28+
github.com/mailru/easyjson v0.9.0 // indirect
2829
github.com/mitchellh/mapstructure v1.5.0 // indirect
2930
github.com/oklog/ulid v1.3.1 // indirect
3031
github.com/opentracing/opentracing-go v1.2.0 // indirect
31-
go.mongodb.org/mongo-driver v1.11.6 // indirect
32-
go.opentelemetry.io/otel v1.14.0 // indirect
33-
go.opentelemetry.io/otel/trace v1.14.0 // indirect
32+
go.mongodb.org/mongo-driver v1.17.4 // indirect
33+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
34+
go.opentelemetry.io/otel v1.37.0 // indirect
35+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
36+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
37+
golang.org/x/sync v0.16.0 // indirect
3438
gopkg.in/yaml.v3 v3.0.1 // indirect
3539
)

go.sum

Lines changed: 79 additions & 71 deletions
Large diffs are not rendered by default.

pkg/cli/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func eventCmd(c *cli.Context) error {
2323

2424
identities := fhclient.APIKVtoChangeIdentities(fhclient.MapToAPIKV(fhclient.ParseKV(c.String("identities"))))
2525

26-
params.V1ChangesEvents = &models.PostV1ChangesEvents{
26+
params.PostV1ChangesEvents = &models.PostV1ChangesEvents{
2727
Environments: fhclient.ParamToList(c.String("environment")),
2828
Services: fhclient.ParamToList(c.String("service")),
2929
StartsAt: strfmt.DateTime(time.Now()),

pkg/cli/execute.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func executeCmd(c *cli.Context) error {
3131

3232
identities := fhclient.ParseKV(c.String("identities"))
3333

34-
params.V1ChangesEvents = &models.PostV1ChangesEvents{
34+
params.PostV1ChangesEvents = &models.PostV1ChangesEvents{
3535
Environments: fhclient.ParamToList(c.String("environment")),
3636
Services: fhclient.ParamToList(c.String("service")),
3737
StartsAt: strfmt.DateTime(time.Now()),
@@ -50,8 +50,8 @@ func executeCmd(c *cli.Context) error {
5050
cErr := cmdExec.Run()
5151

5252
duration := time.Since(start) / time.Millisecond
53-
params.V1ChangesEvents.EndsAt = strfmt.DateTime(time.Now())
54-
params.V1ChangesEvents.StartsAt = strfmt.DateTime(start)
53+
params.PostV1ChangesEvents.EndsAt = strfmt.DateTime(time.Now())
54+
params.PostV1ChangesEvents.StartsAt = strfmt.DateTime(start)
5555

5656
// getting the exit code is a pita so i'm not doing it yet
5757
if cErr != nil {
@@ -61,7 +61,7 @@ func executeCmd(c *cli.Context) error {
6161
fmt.Println(fmt.Sprintf("Executed command, duration %dms", duration))
6262
}
6363

64-
params.V1ChangesEvents.ChangeIdentities = fhclient.APIKVtoChangeIdentities(fhclient.MapToAPIKV(identities))
64+
params.PostV1ChangesEvents.ChangeIdentities = fhclient.APIKVtoChangeIdentities(fhclient.MapToAPIKV(identities))
6565
resp, err := client.Client.Changes.PostV1ChangesEvents(params, client.Auth)
6666

6767
if err != nil {

readme.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ $ fhcli --version
3434

3535
### Parameters
3636

37-
* Environment Name `--environment` `FH_ENVIRONMENT`
38-
* Service `--service` `FH_SERVICE`
37+
* Environment (Id or slug) `--environment` `FH_ENVIRONMENT`
38+
* Service (Id or slug) `--service` `FH_SERVICE`
3939
* API Key `--apiKey` `FH_API_KEY`
4040
* Config file `--config` `FH_CONFIG_FILE`
4141
* Identities `--identities` `FH_IDENTITIES`
@@ -44,6 +44,8 @@ _or_
4444
* Command
4545
This command is run in a subshell, automatically instrumented with a duration and the result is submitted to the FH API
4646

47+
Note: For Environments and Services, arbitrary values will result in these fields being left blank. Please make sure that the ID or slug used here matches the value for your environment/service in the Service Catalog.
48+
4749
### Environment Variables
4850

4951
### Configuration file

0 commit comments

Comments
 (0)