Skip to content

Commit

Permalink
docs(readme): fix potential issue in housekeeping
Browse files Browse the repository at this point in the history
Exclude tags with multiple digits per position for MAJOR, MINOR and PATCH-Versions while housekeeping.
  • Loading branch information
weissera committed Mar 20, 2023
1 parent 0436897 commit 8281ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,11 +921,11 @@ git branch -r | grep 'origin' | grep --invert-match 'master$' | grep --invert-ma

```sh
# Delete all local tags that do NOT match a pattern of a semantic version (MAJOR.MINOR.PATCH), e.g. ods-generated-v20220518.001, v1.0.0-next.5
git tag -l | grep --invert-match '^v[[:digit:]].[[:digit:]].[[:digit:]]$' | xargs git tag -d
git tag -l | grep --invert-match '^v[[:digit:]]*.[[:digit:]]*.[[:digit:]]*$' | xargs git tag -d

# Delete all remote tags that do NOT match a pattern of a semantic version (MAJOR.MINOR.PATCH), e.g. ods-generated-v20220518.001, v1.0.0-next.5
# Skip git hooks with '--no-verify'
git ls-remote --tags origin | cut -d/ -f3- | grep --invert-match '^v[[:digit:]].[[:digit:]].[[:digit:]]$' | grep -v '}$' | xargs git push --delete --no-verify origin
git ls-remote --tags origin | cut -d/ -f3- | grep --invert-match '^v[[:digit:]]*.[[:digit:]]*.[[:digit:]]*$' | grep -v '}$' | xargs git push --delete --no-verify origin
```

### OpenShift
Expand Down

0 comments on commit 8281ffa

Please sign in to comment.