skilld-labs / plasmactl-bump

Launchrctl plugin to update the version of Ansible roles which were updated in last commit
Apache License 2.0
0 stars 1 forks source link

fix version string conversion #15

Closed iignatevich closed 6 months ago

davidferlay commented 6 months ago

Fix solves issue when bumping:

- platform__libraries__trackcell from 64619ea839da4 to 64619ea839da4
- cognition__applications__data_bus from 11852f3d63156 to 64619ea839da4
- cognition__executors__locomotive_distance from f64fa552563bc to 64619ea839da4
panic: interface conversion: interface {} is float64, not string

goroutine 1 [running]:
github.com/skilld-labs/plasmactl-bump.(*Resource).GetVersion(0xc0049c58f0?)
    github.com/skilld-labs/plasmactl-bump@v1.1.0/bump.go:98 +0x29f
github.com/skilld-labs/plasmactl-bump.(*bumpService).updateResources(0xc00049aec0?, 0xc004196630?, {0xc0036dda40, 0xd})
    github.com/skilld-labs/plasmactl-bump@v1.1.0/bump.go:264 +0x1e8
github.com/skilld-labs/plasmactl-bump.(*bumpService).Bump(0xc000313bd0)
    github.com/skilld-labs/plasmactl-bump@v1.1.0/bump.go:213 +0x105
github.com/skilld-labs/plasmactl-bump.(*Plugin).CobraAddCommands.func1(0xc00013b600?, {0xc26b8d?, 0x4?, 0xc26b4d?})
    github.com/skilld-labs/plasmactl-bump@v1.1.0/plugin.go:41 +0x26
github.com/spf13/cobra.(*Command).execute(0xc0003b0f08, {0x124fb80, 0x0, 0x0})
    github.com/spf13/cobra@v1.8.0/command.go:983 +0xaca
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003b0308)
    github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/launchrctl/launchr.(*appImpl).exec(0xc0003be090)
    github.com/launchrctl/launchr@v0.6.0/app.go:230 +0x691
github.com/launchrctl/launchr.(*appImpl).Execute(0xc0003be090)
    github.com/launchrctl/launchr@v0.6.0/app.go:240 +0x8e
github.com/launchrctl/launchr.Run(...)
    github.com/launchrctl/launchr@v0.6.0/app.go:260
main.main()
    plasmactl/main.go:20 +0x1f

Tested ok :ok_hand: