Skip to content

Improve case when git command fails to retrieve Git tags #278

@dennis-behm

Description

@dennis-behm

Improve handling error situation in pipeline template scripts where the git tag is retrieved to compute release candidate tag:

echo [INFO] Computed tag for the next release: ${newVersionTag}
# Compute the name of the next release candidate
export releaseCandidate=$(git tag --list "${newVersionTag}_*rc*" --sort=version:refname | tail -n 1)
echo [INFO] Current release candidate tag: ${releaseCandidate}
if [ -z "${releaseCandidate}" ]; then
# initial version tag
export newVersionTag="${newVersionTag}_rc00"
echo [INFO] Updated release candidate tag: ${newVersionTag}
else

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions