Nothing has been indexed for 0.0.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  reqs-up:
    github: evgkrsk/reqs-up
    version: ~> 0.0.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.0.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

reqs-up

Simple CLI utility to update semver versions in ansible's requirements.yml files.

It tries to fetch remote url (only git supported at moment) and bump up version to latest one.

It is assumed that all urls is accesible or public (i.e. may be view by "git ls-remote" without manual authentication).

Note: all comments in YAML will be LOST (PR-s welcome)!

Examples

# reqs-up -f ./requirements.yaml
  • update 'requirements.yaml' file in-place, bumping up versions
# reqs-up --dry-run
  • dry-run, print new version of YAML doc on stdout. requirements.yml assumed in current working dir.
# reqs-up --minor
  • update only within minor version (same major). Example: 1.2.3 -> 1.9.5 (but not 2.0.0)
# reqs-up --patch
  • update only within patch version (same major and minor). Example: 1.2.3 -> 1.2.8 (but not 1.3.0)

Output

When updating, the tool shows the old version, new version, and explanation:

ansible-role-1: 1.2.3 โ†’ 1.2.8 (max patch version for 1.2.x)
ansible-role-2: 1.2.3 โ†’ 1.9.5 (max minor version for 1.x)
ansible-role-3: 1.2.3 โ†’ 2.1.0 (latest)

Options

  • -f FILE, --file=FILE - Specifies the requirements file (default: ./requirements.yml)
  • -n, --dry-run - Output result YAML to stdout instead of writing to file
  • -m, --minor - Update only within minor version (same major)
  • -p, --patch - Update only within patch version (same major and minor)
  • -h, --help - Show help and exit
  • -v, --version - Print version and exit

Note: --minor and --patch are mutually exclusive.