diff options
| author | James Tucker <james@tailscale.com> | 2025-01-30 14:47:40 -0800 |
|---|---|---|
| committer | James Tucker <james@tailscale.com> | 2025-01-30 14:47:40 -0800 |
| commit | 50501f00a66ce39c0f34506064f28dcce3f1479b (patch) | |
| tree | 8813e7d97e0962249b50ebb4151c472b95ca0d16 | |
| parent | 7d5fe13d27126b96d81b0c654bd552a19db8a312 (diff) | |
| download | tailscale-raggi/mkversion-pre.tar.xz tailscale-raggi/mkversion-pre.zip | |
version/mkversion: support tags ending in -preraggi/mkversion-pre
Updates #TODO
Signed-off-by: James Tucker <james@tailscale.com>
| -rw-r--r-- | version/mkversion/mkversion.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/version/mkversion/mkversion.go b/version/mkversion/mkversion.go index 2fa84480d..eb52a2c4f 100644 --- a/version/mkversion/mkversion.go +++ b/version/mkversion/mkversion.go @@ -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 |
