Add test for release_branch

This commit is contained in:
Phil Jay
2023-09-18 08:46:35 +10:00
parent 2ef15157dd
commit e5f8667dfc

View File

@@ -224,6 +224,22 @@ function init_repo {
[[ "$output" = *"VERSION=1.2.4-pre.${short_ref}"* ]] [[ "$output" = *"VERSION=1.2.4-pre.${short_ref}"* ]]
} }
@test "does not append prerelease information if on a specified release_branch" {
init_repo
export current_version=1.2.3
export GITHUB_REF="refs/heads/releases"
export release_branch="releases"
run ../../version-increment.sh
print_run_info
[ "$status" -eq 0 ] &&
[[ "$output" != *"PRE_RELEASE_LABEL=pre."* ]] &&
[[ "$output" != *"VERSION=1.2.4-pre."* ]] &&
[[ "$output" = *"VERSION=1.2.4"* ]]
}
@test "appends prerelease information in pep440 compatible way when pep440 is true" { @test "appends prerelease information in pep440 compatible way when pep440 is true" {
init_repo init_repo