Skip to content

Commit

Permalink
Adds missing bump-recipe documentation (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
schuylermartin45 authored Dec 10, 2024
1 parent 17cec43 commit b02a878
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
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

0 comments on commit b02a878

Please sign in to comment.