pkgctl repo: introduce the switch subcommand
This MR implements the idea about the pkgctl repo switch
command as @anthraxx outlined it in !140 (comment 92979)!
Example usages are:
# successfull invocation on multiple pkgbases
$ pkgctl repo switch --version="1.14.6-1" gopass gopass-jsonapi 130 ↵
==> Successfully switched gopass to version 1.14.6-1
==> Successfully switched gopass-jsonapi to version 1.14.6-1
# one tag does not exist
$ pkgctl repo switch --version="1.15.3-1" gopass gopass-jsonapi
==> Successfully switched gopass to version 1.15.3-1
==> ERROR: Failed to switch gopass-jsonapi to version 1.15.3-1 because required tag 1.15.3-1 does not exist
# invocation with pkgbase being inferred from pwd
$ cd go
$ pkgctl repo switch --version="2:1.19.5-1"
==> Successfully switched go to version 2:1.19.5-1
$ pkgctl repo switch --force --version="2:1.19.5-1"
==> Successfully switched go to version 2:1.19.5-1
$ pkgctl repo switch --version="2:1.19.5-2"
==> ERROR: Failed to switch go to version 2:1.19.5-2 because required tag 2-1.19.5-2 does not exist
Edited by Christian Heusel