Improve release (#1287)

* fix rc release

* add rc to patch
This commit is contained in:
Guillermo Vayá
2020-05-07 17:04:45 +02:00
committed by GitHub
parent 162a5a7fa4
commit ec8f509385

View File

@@ -84,12 +84,12 @@ case "${1}" in
if [[ "${pkg_version}" =~ "-rc" ]]; then
rc="${pkg_version#*-rc}"
else
print_warning "No release candidate on the version, assuming 0"
rc=0
print_warning "No release candidate on the version, assuming 1"
rc=1
fi
case "${rc}" in
''|*[!0-9]*)
print_warning "Can't guess release candidate from version, assuming 0"
print_warning "Can't guess release candidate from version, assuming 1"
rc=1
;;
*)
@@ -123,7 +123,7 @@ case "${1}" in
;;
"patch")
if [[ "${branch_name}" =~ "release-" ]]; then
new_pkg_version="${major}.${minor}.$(( micro + 1 ))"
new_pkg_version="${major}.${minor}.$(( micro + 1 ))-rc1"
print_info "Releasing v${new_pkg_version}"
write_package_version "${new_pkg_version}"
tag "${new_pkg_version}" "Released on $(date -u)"