Designed to make working with mod files easier.
Commands are actions taken on the dependency chain.
This is usually parsed as the first non-flag argument passed to the utility.
Help commands will print usage instructions and details.
Running help commands with arguments and flags provides more specific contextual details.
:: Designed to make working with mod files easier.
To learn more, run gomu help
or gomu help <command>
(Flags can be added to either help command)
:: Prints available commands and flags.
Use gomu help <command> <flags>
to get more specific info.
:: Prints current version.
Install using gomu upgrade
to get version support.
:: Updates gomu itself!
Optionally accepts a version number.
Without argument, updates to latest tag.
Otherwise updates to latest branch/tag provided by first arg or -b.
Usage: gomu upgrade
or gomu upgrade -b master
or gomu upgrade v0.5.1
Local commands can/will make stashes and edits to local files on your working copies.
However, they will not attempt to commit or push any changes by themselves.
:: Prints each file in dependency chain.
:: Updates branch for file in dependency chain. Providing a -branch will checkout given branch. Creates branch if provided none exists.
:: Replaces each versioned file in the dependency chain. Uses the current checked out local copy.
:: Reverts go.mod and go.sum back to last committed version.
Usage: gomu reset mod-common parg
:: Runs go test
on each library in the dependency chain.
Prints names of failing libraries.
Usage: gomu test mod-common
Destructive commands can/will attempt to commit and push changes.
If running with -name-only, it will NOT prompt you for a warning.
Please be careful!
:: Updates modfiles.
Conditionally performs extra tasks depending on flags.
Usage: gomu <flags> sync mod-common parg simply <flags>
:: Adds a github workflow to a repo.
Requires -source .
Usage: gomu workflow mod-utils -c -b new-workflow -source workflows/templates/auto-tag.yml
Flags are options that can be set for some commands.
Flags can be added before or after command name.
However, it is best not to split up flags and commands/args to avoid any accidental commands.
:: Will aggregate files in 1 or more directories.
Usage: gomu list -i hatchify -i vroomy
:: Will checkout or create said branch
Updating or creating a pull request.
Depending on command and other flags.
Usage: gomu pull -b feature/Jira-Ticket
:: Will reduce output to just the filenames changed.
(ls-styled output for | chaining)
Usage: gomu list -name
:: Will avoid recursion in dependency sorting.
Only includes deps in go.mod (not go.sum).
Usage: gomu list mod-utils -direct
:: Will commit local changes if present.
Includes all changed files in repository.
Usage: gomu sync -c
:: Will create a pull request if possible.
Fails if on master, or if no changes.
Usage: gomu sync -pr
:: Will set a custom commit message.
Applies to -c and -pr flags.
Usage: gomu sync -c -m "Update all the things!"
:: Will increment tag if new commits since last tag.
Requires tag previously set.
Usage: gomu sync -t
:: Can be used with -tag to update semver.
Will force tag version for all deps in chain.
Usage: gomu sync -t -set v0.5.0
:: Required for workflow and secret commands.
Will provide a source template or secret file.
Usage: gomu workflow mod-utils -source path/to/template.yml