mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-26 19:21:01 +00:00
Merge 50501f00a66ce39c0f34506064f28dcce3f1479b into b3455fa99a5e8d07133d5140017ec7c49f032a07
This commit is contained in:
commit
ba3fe3d778
@ -190,7 +190,12 @@ func tailscaleModuleRef(modBs []byte) (string, error) {
|
||||
// Get the last - separated part of req.Mod.Version
|
||||
// (which is the git hash).
|
||||
if i := strings.LastIndexByte(req.Mod.Version, '-'); i != -1 {
|
||||
return req.Mod.Version[i+1:], nil
|
||||
// If the last part is "pre", the version is a pre-release.
|
||||
hashOrPre := req.Mod.Version[i+1:]
|
||||
if hashOrPre == "pre" {
|
||||
return req.Mod.Version, nil
|
||||
}
|
||||
return hashOrPre, nil
|
||||
}
|
||||
// If there are no dashes, the version is a tag.
|
||||
return req.Mod.Version, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user