Skip to content

Commit

Permalink
bump api package
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme authored and Antoine Grondin committed Jan 14, 2023
1 parent 64c6d86 commit 417d36d
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 38 deletions.
4 changes: 2 additions & 2 deletions cmd/humanlog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ func newApp() *cli.App {
log.Printf("a new version of humanlog is available: please update")
}
updateStatefile := false
if statefile.AccountID == nil && res.accountID != "" {
if statefile.AccountID == nil && res.accountID > 0 {
updateStatefile = true
statefile.AccountID = &res.accountID
}
if statefile.MachineID == nil && res.machineID != "" {
if statefile.MachineID == nil && res.machineID > 0 {
updateStatefile = true
statefile.MachineID = &res.machineID
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/bufbuild/connect-go v1.1.0
github.com/fatih/color v1.13.0
github.com/go-logfmt/logfmt v0.5.1
github.com/humanlog-io/api/go v0.0.0-20221107080824-690520531f97
github.com/humanlog-io/api/go v0.0.0-20221107084702-a2c1dd4d4370
github.com/kr/logfmt v0.0.0-20210122060352-19f9bcb100e6
github.com/mattn/go-colorable v0.1.13
github.com/urfave/cli v1.22.10
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/humanlog-io/api/go v0.0.0-20221107080824-690520531f97 h1:B2E/MKTEXp3zvxcrkGZcTJBx2LcgBwNJsl2Cb52ooKc=
github.com/humanlog-io/api/go v0.0.0-20221107080824-690520531f97/go.mod h1:s70Li+2S6iuILyGnpQwxtIX9t5W8VdT67pbCz0Pi6/Y=
github.com/humanlog-io/api/go v0.0.0-20221107084702-a2c1dd4d4370 h1:4QNu4hCV9EPTIMFBkSUrXIItjvDEGs/7++OuQasAHLg=
github.com/humanlog-io/api/go v0.0.0-20221107084702-a2c1dd4d4370/go.mod h1:s70Li+2S6iuILyGnpQwxtIX9t5W8VdT67pbCz0Pi6/Y=
github.com/kr/logfmt v0.0.0-20210122060352-19f9bcb100e6 h1:ZK1mH67KVyVW/zOLu0xLva+f6xJ8vt+LGrkQq5FJYLY=
github.com/kr/logfmt v0.0.0-20210122060352-19f9bcb100e6/go.mod h1:JIiJcj9TX57tEvCXjm6eaHd2ce4pZZf9wzYuThq45u8=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func WriteStateFile(path string, state *State) error {
}

type State struct {
Version int `json:"version"`
AccountID *string `json:"account_id"`
MachineID *string `json:"machine_id"`
Version int `json:"version"`
AccountID *int64 `json:"account_id"`
MachineID *int64 `json:"machine_id"`
}

func (cfg State) populateEmpty(other *State) *State {
Expand Down
87 changes: 58 additions & 29 deletions vendor/github.com/humanlog-io/api/go/svc/cliupdate/v1/service.pb.go

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

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ github.com/fatih/color
# github.com/go-logfmt/logfmt v0.5.1
## explicit; go 1.17
github.com/go-logfmt/logfmt
# github.com/humanlog-io/api/go v0.0.0-20221107080824-690520531f97
# github.com/humanlog-io/api/go v0.0.0-20221107084702-a2c1dd4d4370
## explicit; go 1.19
github.com/humanlog-io/api/go/svc/cliupdate/v1
github.com/humanlog-io/api/go/svc/cliupdate/v1/cliupdatev1connect
Expand Down

0 comments on commit 417d36d

Please sign in to comment.