Modify gorepomod to unpin conditionally.

This commit is contained in:
monopole
2021-02-11 14:51:00 -08:00
parent c764bc1618
commit 52fbe73d49
4 changed files with 53 additions and 23 deletions

View File

@@ -37,14 +37,19 @@ Use this to get module names for use in other commands.
Creates a change with mechanical updates
to `go.mod` and `go.sum` files.
#### `gorepomod unpin {module}`
#### `gorepomod unpin {module} [{conditionalmodule}]`
Creates a change to `go.mod` files.
For each module _m_ in the repository,
if _m_ depends on a _{module}_,
then _m_'s dependency on it will be replaced by
a relative path to the in-repo module.
if _m_ depends on a _{module}_, then
_m_'s dependency on _{module} will be
replaced by a relative path to the in-repo
version of _{module}_.
If _conditionalModule_ is specified, then
the replacement of _{module}_ will happen
if _m_ depends on _{conditionalModule}_.
#### `gorepomod pin {module} [{version}]`