Commit c0eef3f6 authored by David Kempe's avatar David Kempe
Browse files

bumpver script

parent f97e622c
Pipeline #1070 failed with stage
in 11 seconds
#!/usr/bin/awk -f
# bumpver prints a modified debian package control file based on
# environment variables set from Gitlab CI. If a tagged revision is
# being built, then the Version field is the plain semver. Otherwise,
# the version from the control file has the Gitlab CI pipeline ID
# appended.
/Version/ {
if (ENVIRON["CI_COMMIT_TAG"]) {
# strip "v" prefix from tag
semver = ENVIRON["CI_COMMIT_TAG"]
sub("^v", "", semver)
printf "%s %s\n", $1, semver
next
}
printf("%s-%d\n", $0, ENVIRON["CI_PIPELINE_IID"])
next
}
{
print
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment