On Wed, Mar 17, 2021 at 04:10:54PM -0400, Josh Rickmar wrote:
> On Wed, Mar 17, 2021 at 07:44:52PM +0000, Stuart Henderson wrote:
> > On 2021/03/17 12:53, Josh Rickmar wrote:
> > > This portgen(1) patch allows for an optional @version suffix to a
> > > ported Go module to specify a tag or branch to port. The implied
> > > default is @latest, which is the latest semver tag known by the proxy
> > > server. This is the same syntax used to refer to module versions in
> > > Go's own tooling.
> > >
> > > I've inlined two patches here for both the src and ports trees since
> > > the portgen manpage is in src.
> >
> > Works for me, I've wanted to do this a few times before and know that
> > others have too so definitely useful.
> >
> > > + elsif ($at_version =~ /^v\d+\.\d+\.\d+/) {
> >
> > Is this vx.y.z format fixed with go, or just a convention?
>
> Released versions of Go modules do need to follow semver exactly,
> although I suppose the match should actually be:
>
> /^v\d+\.\d+\.\d+(-[^\+])?/
Oops, let's do better:
/^v\d+\.\d+\.\d+(-[^\+]+)$?/