feat: add teardown to app base

This commit is contained in:
James Houlahan
2020-12-16 10:34:59 +01:00
parent 122eac50a6
commit dfbf25a9f4
3 changed files with 27 additions and 4 deletions

View File

@ -108,6 +108,9 @@ func run(b *base.Base, c *cli.Context) error { // nolint[funlen]
// Bridge supports no-window option which we should use for autostart.
b.Autostart.Exec = append(b.Autostart.Exec, "--no-window")
// We want to remove old versions if the app exits successfully.
b.AddTeardownAction(b.Versioner.RemoveOldVersions)
f := frontend.New(
constants.Version,
constants.BuildVersion,