When releasing, allow certain replacements.

This commit is contained in:
monopole
2021-04-30 17:08:16 -07:00
parent 7716b1bd3d
commit b6fba0ad5c
4 changed files with 54 additions and 6 deletions

View File

@@ -37,6 +37,10 @@ var (
"releasing",
"site",
}
// TODO: make this a PATH-like flag
allowedReplacements = []string {
"gopkg.in/yaml.v3",
}
)
type Command int
@@ -64,6 +68,14 @@ func (a *Args) GetCommand() Command {
return a.cmd
}
func (a *Args) AllowedReplacements() (result []string) {
// Make sure the list has no repeats.
for k := range utils.SliceToSet(allowedReplacements) {
result = append(result, k)
}
return
}
func (a *Args) Bump() semver.SvBump {
return a.bump
}