mirror of
https://github.com/reecetech/version-increment.git
synced 2025-12-21 14:35:44 +00:00
Add tests for v prefixed version output
This commit is contained in:
@@ -104,6 +104,20 @@ function init_repo {
|
|||||||
[[ "$output" = *"::set-output name=version::2.0.0"* ]]
|
[[ "$output" = *"::set-output name=version::2.0.0"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "prefixes with v" {
|
||||||
|
init_repo
|
||||||
|
|
||||||
|
export current_version=1.2.3
|
||||||
|
export increment="major"
|
||||||
|
|
||||||
|
run ../../version-increment.sh
|
||||||
|
|
||||||
|
print_run_info
|
||||||
|
[ "$status" -eq 0 ] &&
|
||||||
|
[[ "$output" = *"::set-output name=version::2.0.0"* ]] &&
|
||||||
|
[[ "$output" = *"::set-output name=v-version::v2.0.0"* ]]
|
||||||
|
}
|
||||||
|
|
||||||
@test "increments to a new month (calver)" {
|
@test "increments to a new month (calver)" {
|
||||||
init_repo
|
init_repo
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,19 @@ function init_repo {
|
|||||||
[[ "$output" = *"::set-output name=current-version::0.1.2"* ]]
|
[[ "$output" = *"::set-output name=current-version::0.1.2"* ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "prefixes with a v" {
|
||||||
|
init_repo
|
||||||
|
|
||||||
|
git tag 0.1.2
|
||||||
|
|
||||||
|
run ../../version-lookup.sh
|
||||||
|
|
||||||
|
print_run_info
|
||||||
|
[ "$status" -eq 0 ] &&
|
||||||
|
[[ "$output" = *"::set-output name=current-version::0.1.2"* ]] &&
|
||||||
|
[[ "$output" = *"::set-output name=current-v-version::v0.1.2"* ]]
|
||||||
|
}
|
||||||
|
|
||||||
@test "finds the current normal version even if there's a newer pre-release version" {
|
@test "finds the current normal version even if there's a newer pre-release version" {
|
||||||
init_repo
|
init_repo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user