Skip to content

Commit c8de7fa

Browse files
authored
Merge pull request #220 from tailscale/mpminardi/latest-fix
src: check against platform specific versions for latest and unstable
2 parents bd97ec6 + bf5cb7c commit c8de7fa

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

dist/index.js

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,17 @@ async function resolveVersion(
262262
pkg,
263263
]);
264264
const response = JSON.parse(stdout);
265-
return response.Version;
265+
switch (runnerOS) {
266+
case runnerLinux:
267+
return response.TarballsVersion;
268+
case runnerMacOS:
269+
// Use latest tag on macOS since we are building from source
270+
return response.Version;
271+
case runnerWindows:
272+
return response.MSIsVersion;
273+
default:
274+
return response.Version;
275+
}
266276
}
267277

268278
return version;

0 commit comments

Comments
 (0)