mirror of
https://github.com/reecetech/version-increment.git
synced 2025-12-21 06:25:44 +00:00
Introduce new outputs
This commit is contained in:
@@ -414,8 +414,8 @@ function init_repo {
|
||||
@test "increments the patch version by default if no conventional commits found and enabled (conventional commits) (with tag_prefix)" {
|
||||
init_repo
|
||||
|
||||
export tag_prefix="@org/product"
|
||||
export current_version="@org/product@1.2.3"
|
||||
export tag_prefix="@org/product@"
|
||||
export current_version="1.2.3"
|
||||
export scheme="conventional_commits"
|
||||
|
||||
echo "some new change" > feat.txt
|
||||
@@ -426,7 +426,7 @@ function init_repo {
|
||||
|
||||
print_run_info
|
||||
[ "$status" -eq 0 ] &&
|
||||
[[ "$output" = *"VERSION=@org/product@1.2.4"* ]]
|
||||
[[ "$output" = *"V_VERSION=@org/product@v1.2.4"* ]]
|
||||
[[ "$output" = *"VERSION=1.2.4"* ]]
|
||||
[[ "$output" = *"V_VERSION=v1.2.4"* ]]
|
||||
[[ "$output" = *"No conventional commit found"* ]]
|
||||
}
|
||||
|
||||
@@ -156,6 +156,20 @@ function init_repo {
|
||||
[[ "$output" = *"CURRENT_VERSION=0.0.0"* ]]
|
||||
}
|
||||
|
||||
@test "returns 0.0.0 if no prefix version detected even if there's a non-prefix release version" {
|
||||
init_repo
|
||||
|
||||
export tag_prefix="code/"
|
||||
|
||||
git tag 0.1.0
|
||||
|
||||
run version-lookup.sh
|
||||
|
||||
print_run_info
|
||||
[ "$status" -eq 0 ] &&
|
||||
[[ "$output" = *"CURRENT_VERSION=0.0.0"* ]]
|
||||
}
|
||||
|
||||
@test "returns a calver if no normal version detected and calver scheme specified" {
|
||||
init_repo
|
||||
|
||||
|
||||
Reference in New Issue
Block a user