Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotated Tags Please #124

Closed
emontellese opened this issue Dec 1, 2020 · 4 comments
Closed

Annotated Tags Please #124

emontellese opened this issue Dec 1, 2020 · 4 comments

Comments

@emontellese
Copy link

Suggestion / Request to use annotated tags for version tag numbers.

This is considered "best practice" by a number of open source projects and annotated tags have a number of advantages for official releases.

For our purposes, it will simplify the way that we use 'git describe' to collect information about packages that are a part of our build. By default, git describe ignores "lightweight tags"

Many thanks!

@ericcurtin
Copy link
Member

Done:

#!/bin/bash
  
set -e

git for-each-ref refs/tags | grep commit | while read -r i; do
  tag=$(echo "$i" | awk -F"/" '{printf $NF"\n"}')
  echo "Creating $tag"
  git tag -a -f "$tag" "$tag" -m ""
  echo "Pushing $tag"
  git push -f origin "$tag"
done

@ericcurtin
Copy link
Member

Who is "our" by the way @emontellese ? I'm thinking of compiling a list of of companies/orgs/projects that use this tool

@emontellese
Copy link
Author

Many thanks! "Our" in this case is Netgear for some code / products still in development. Look for more info about these projects from Netgear in the months to come :)

@ericcurtin
Copy link
Member

Ah yes, I've had a netgear router or two in the past, good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants