Fix bin/root-tag when applied to annotated tags (#4299)

Fixes #4298

Since we started using using annotated tags for releases (because they
need to be signed), `bin/root-tag` will append `^0` to them when used
after checking out a release tag. E.g.:

```
$ bin/root-tag
edge-20.4.4^0
```

which breaks version checking by the CLI.

This PR removes that trailing `^0` whenever it's present
This commit is contained in:
Alejandro Pedraza 2020-04-27 11:08:51 -05:00 committed by GitHub
parent 17dacf5548
commit 437f53cdcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,9 @@ clean_head() {
} }
named_tag() { named_tag() {
echo "$(git name-rev --tags --name-only $(git_sha_head))" tag="$(git name-rev --tags --name-only $(git_sha_head))"
tag=${tag%"^0"}
echo "${tag}"
} }
head_root_tag() { head_root_tag() {