Skip to content

Commit

Permalink
fix: ruff artifact file format change
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Dec 13, 2023
1 parent 6632920 commit 7158847
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ports/ruff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
type InstallConfigSimple,
type PlatformInfo,
registerDenoPortGlobal,
semver,
std_fs,
std_path,
std_url,
Expand Down Expand Up @@ -100,5 +101,8 @@ function artifactUrl(installVersion: string, platform: PlatformInfo) {
default:
throw new Error(`unsupported arch: ${platform.arch}`);
}
return `${repoAddress}/releases/download/${installVersion}/${repoName}-${arch}-${os}.${ext}`;
const prefix = semver.lt(semver.parse(installVersion), semver.parse("0.1.9"))
? repoName
: `${repoName}-${installVersion.replace(/^v/, "")}`;
return `${repoAddress}/releases/download/${installVersion}/${prefix}-${arch}-${os}.${ext}`;
}

0 comments on commit 7158847

Please sign in to comment.