mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-25 17:39:33 +01:00
Add verbose option
This commit is contained in:
parent
a754e4ed0a
commit
a708ddccfe
2 changed files with 13 additions and 1 deletions
|
@ -16,6 +16,7 @@ Every argument is optional.
|
||||||
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------|
|
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------|
|
||||||
| crate-name | The crate whose API to check for semver. If not set, all crates in the workspace are processed. | |
|
| crate-name | The crate whose API to check for semver. If not set, all crates in the workspace are processed. | |
|
||||||
| manifest-path | Path to Cargo.toml of crate or workspace to check. Has an effect only if `crate-name` is not specified. | |
|
| manifest-path | Path to Cargo.toml of crate or workspace to check. Has an effect only if `crate-name` is not specified. | |
|
||||||
|
| verbose | Enables verbose output of `cargo-semver-checks`. | `false` |
|
||||||
|
|
||||||
# Scenarios
|
# Scenarios
|
||||||
|
|
||||||
|
|
13
action.yml
13
action.yml
|
@ -12,6 +12,11 @@ inputs:
|
||||||
description: 'Path to Cargo.toml of crate or workspace to check. Has an effect only if crate-name is not specified.'
|
description: 'Path to Cargo.toml of crate or workspace to check. Has an effect only if crate-name is not specified.'
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
verbose:
|
||||||
|
description: 'Enables verbose output of `cargo-semver-checks`.'
|
||||||
|
type: boolean
|
||||||
|
required: true
|
||||||
|
default: false
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -31,7 +36,13 @@ runs:
|
||||||
export CRATE_NAME="${{ inputs.crate-name }}"
|
export CRATE_NAME="${{ inputs.crate-name }}"
|
||||||
export MANIFEST_PATH="${{ inputs.manifest-path }}"
|
export MANIFEST_PATH="${{ inputs.manifest-path }}"
|
||||||
|
|
||||||
export SEMVER_CHECKS_OPTIONS="${CRATE_NAME:+"--package $CRATE_NAME"} ${MANIFEST_PATH:+"--manifest-path $MANIFEST_PATH"}"
|
if [[ ${{ inputs.verbose }} == 'true' ]]; then
|
||||||
|
export VERBOSE_FLAG="--verbose"
|
||||||
|
else
|
||||||
|
export VERBOSE_FLAG=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SEMVER_CHECKS_OPTIONS="${CRATE_NAME:+"--package $CRATE_NAME"} ${MANIFEST_PATH:+"--manifest-path $MANIFEST_PATH"} $VERBOSE_FLAG"
|
||||||
|
|
||||||
# Check for semver violations.
|
# Check for semver violations.
|
||||||
cargo install cargo-semver-checks --locked
|
cargo install cargo-semver-checks --locked
|
||||||
|
|
Loading…
Reference in a new issue