Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing bump-recipe documentation #269

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ Usage: crm [OPTIONS] COMMAND [ARGS]...
Command line interface for conda recipe management commands.

Options:
--help Show this message and exit.
-v, --verbose Enables verbose logging (for commands that use the logger).
--help Show this message and exit.

Commands:
bump-recipe Bumps a recipe file to a new version.
convert Converts a `meta.yaml` formatted-recipe file to the new
`recipe.yaml` format.
graph Interactive CLI for examining recipe dependency graphs.
Expand Down
44 changes: 44 additions & 0 deletions conda_recipe_manager/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,50 @@ to unique error cases.

# List of Tools

## `bump-recipe`
This tool takes an existing recipe file and "bumps" it to target a new software version.

As of writing, this tool can automatically update:
- The `/build/number` field
- The package version number (either by canonical `version` variable or `/package/version` field)
- Any applicable `sha-256` fields in the `/source` section

If a network request is required to perform a modification, this script will use a retry-with-a-back-off mechanism to
recover in the event of a network failure.

If the recipe only needs to increment the `/build/number` field, `--build-num` flag can be used.

### Usage
```sh
Usage: crm bump-recipe [OPTIONS] RECIPE_FILE_PATH

Bumps a recipe to a new version.

RECIPE_FILE_PATH: Path to the target recipe file

Options:
-b, --build-num Bump the build number by 1.
-d, --dry-run Performs a dry-run operation that prints the
recipe to STDOUT and does not save to the recipe
file.
-t, --target-version TEXT New project version to target. Required if
`--build-num` is NOT specified.
-i, --retry-interval FLOAT Retry interval (in seconds) for network
requests. Scales with number of failed attempts.
Defaults to 30 seconds
--help Show this message and exit.
```

### Example
Upgrade the `types-toml` feedstock from version `0.10.8.6` to `0.10.8.20240310`.
```sh
crm bump-recipe -t 0.10.8.20240310 types-toml-feedstock/recipe/meta.yaml
```
Only increment the `/build/number` field.
```sh
crm bump-recipe --build-num types-toml-feedstock/recipe/meta.yaml
```

## `convert`
This tool converts one or more recipe files from the V0 recipe format to the
[V1 recipe format](https://github.com/conda/ceps/blob/main/cep-14.md).
Expand Down
Loading