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

feat: add options to pass a repo path, and to handle lightweight tags #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codyshepherd
Copy link

@codyshepherd codyshepherd commented Aug 11, 2021

Closes #10 and #5.

Also adds an option to pass an absolute path to the CLI, which makes running this tool easier under a variety of conditions.

@@ -109,6 +113,7 @@ func createRelease(r *git.Repository, verTag string) (*Release, error) {
func findVersionHash(r *git.Repository, verTag string) (plumbing.Hash, error) {
if verTag == "" {
ref, err := r.Head()
//log.Printf(ref.String())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented code

@lesam
Copy link

lesam commented Aug 11, 2021

LGTM other than the commented code but not sure who else should review

@lesam
Copy link

lesam commented Aug 12, 2021

Looks from the merge history like @wolffcm or @jsternberg should have a look.

if !lightweightOK {
return nil, plumbing.ZeroHash, errors.Wrap(err, "could not get tag object from maxRef")
} else {
return maxVersion, maxRef.Hash(), nil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate a bit more? I'm not quite sure what you're asking.

@nathanielc nathanielc requested a review from jsternberg August 12, 2021 16:50
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

Successfully merging this pull request may close these issues.

Enable handling of lightweight git tags
2 participants