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

Correctly specify the version prefix for go.setup #4

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

Conversation

herbygillot
Copy link

The golang portgroup has an explicit field for the version prefix in go.setup. The prefix is used by underlying portgroups, such as the github and bitbucket portgroups.

Until now, for example, go2port has been generating new Portfiles with the following:

...
go.setup            github.com/elves/elvish v0.14.1
...

After this change, go.setup will be correctly generated as:

...
go.setup            github.com/elves/elvish 0.14.1 v
...

Additionally go2port currently has zero tests, so this adds a simple test for the proposed change, and additional tests for current & future functionality can be added over time.

@amake
Copy link
Owner

amake commented Oct 14, 2020

Thanks for looking at this. This has been a small annoyance, but since there's lots of other things to tweak when generating a new portfile I didn't feel it a priority to deal with it.

However I'm not sure about this approach. You probably know that the github and bitbucket portgroups' *.setup functions take both a tag_prefix and a tag_suffix, and this doesn't handle the suffix.

Further, both the prefix and suffix can be arbitrary strings, so parsing them out of a unified string is a bit of a hack. The only way to truly accommodate them is to accept them as additional args on the command line. (Though I recognize that the hack probably handles the vast majority of cases, so it's not out of the question.)

Or is there a spec or requirement specific to golang versioning such that this approach can handle all cases?

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.

2 participants