Open herbygillot opened 3 years ago
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?
The
golang
portgroup has an explicit field for the version prefix ingo.setup
. The prefix is used by underlying portgroups, such as thegithub
andbitbucket
portgroups.Until now, for example,
go2port
has been generating new Portfiles with the following:After this change,
go.setup
will be correctly generated as: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.