Skip to content

Commit

Permalink
handle updated plugin schema
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Jan 27, 2023
1 parent 785548d commit 1d1e20b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/akerl/prospectus-repotimer
go 1.19

require (
github.com/akerl/prospectus/v3 v3.0.0
github.com/akerl/prospectus/v3 v3.0.1
github.com/go-git/go-git/v5 v5.5.2
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 h1:ra2OtmuW0A
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4/go.mod h1:UBYPn8k0D56RtnR8RFQMjmh4KrZzWJ5o7Z9SYjossQ8=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/akerl/prospectus/v3 v3.0.0 h1:99fAifpUmx2Ci38kM7bFSVOpYnognIwIfsrIVrD+0+8=
github.com/akerl/prospectus/v3 v3.0.0/go.mod h1:9kryC2hxZtzi2SKI/UIBgXVOx0hladf2qDzkcW+xMe0=
github.com/akerl/prospectus/v3 v3.0.1 h1:4AsrBFXhN2D1cjNBRl1I9OwrOJ7KgLhi0lcdMbx0BH4=
github.com/akerl/prospectus/v3 v3.0.1/go.mod h1:9kryC2hxZtzi2SKI/UIBgXVOx0hladf2qDzkcW+xMe0=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
Expand Down
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ func run(cfg config) error {

func main() {
cfg := config{}
err := plugin.ParseConfig(&cfg)
meta, err := plugin.ParseConfig(&cfg)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to load config: %s", err)
os.Exit(1)
}
if meta.Mode == plugin.Expected {
fmt.Println("fresh")
return
}
err = run(cfg)
if err != nil {
fmt.Fprintf(os.Stderr, err.Error())
Expand Down

0 comments on commit 1d1e20b

Please sign in to comment.