zoryn-gen-version-up(1)

ZORYN-GEN-VERSION-UP(1) Zoryn Manual ZORYN-GEN-VERSION-UP(1)

NAME

zoryn-gen-version-up - Generate .gear/version-up config from current version.

SYNOPSIS

zoryn gen version-up [OPTION]…

DESCRIPTION

Generate .gear/version-up configuration file based on the current package version. Finds the corresponding git tag and generates pattern/template for version conversion.

This config helps zoryn up filter tags correctly, e.g., to avoid confusing semver tags (0.9.2) with date-based tags (20220125).

When tag format differs from version format, use --tag and --to-version together to specify the mapping. The command will generate appropriate pattern and template.

Working directory: when invoked without -C, the command always operates from the git repository root regardless of the current subdirectory, so .gear/version-up always lands at the repository root. When -C DIR is given, DIR is treated as the working root and no git-root lookup is performed; this differs from most other zoryn commands, where -C is followed by an additional chdir to git root.

OPTIONS

-C DIR
Change to directory DIR before running.
-d, --debug
Enable debug output.
-f, --force
Overwrite existing .gear/version-up file.
--filter=VERSION
Version prefix to filter tags. E.g., --filter 4.5 generates filter = "major=4, minor=5". If .gear/version-up already exists, adds filter to existing config.
-t TAG, --tag=TAG
Git tag corresponding to current spec version.
--to-version=VERSION
Version that the tag converts to. Use with --tag when tag format differs.

COMMON OPTIONS

--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined.
--version
Show version information.

EXIT STATUS

zoryn gen version-up exits with:

0
on success.
123
on indiscriminate errors reported on standard error.
124
on command line parsing errors.
125
on unexpected internal errors (bugs).

EXAMPLES

Generate version-up config (auto-detect tag):


zoryn gen version-up

Specify tag explicitly:


zoryn gen version-up --tag v1.2.3

Tag with different format than version:


zoryn gen version-up --tag osec-12_11_22.11 --to-version 12.11.22.11

Overwrite existing config:


zoryn gen version-up --force

Add filter to existing config:


zoryn gen version-up --filter 4.5

Generate config with filter:


zoryn gen version-up --tag v4.5.5 --to-version 4.5.5 --filter 4.5

SEE ALSO

zoryn(1)

Zoryn 0.46.0