Skip to content

Commit

Permalink
fix: cloud-sql-proxy preset on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Nov 24, 2024
1 parent c29dd5d commit 38052f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ export async function main() {
try {
const templateArgs = {
os: process.platform === "win32" ? "windows" : process.platform,
platform: process.platform,
arch: process.arch === "x64" ? "amd64" : process.arch,
arch2: process.arch,
exe: process.platform === "win32" ? ".exe" : "",
exeOsArch:
process.platform === "win32"
? `${process.arch}.exe`
: `${process.platform}${process.arch === "x64" ? "amd64" : process.arch}`,
archive: process.platform === "win32" ? "zip" : "tar.gz",
};

Expand Down
5 changes: 2 additions & 3 deletions src/presets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ const presets: Record<string, Partial<Config>> = {
"cloud-sql-proxy": {
repo: "GoogleCloudPlatform/cloudsql-proxy",
downloadUrl:
"https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v{{version}}/cloud-sql-proxy.{{os}}.{{arch}}",
downloadName: "cloud-sql-proxy",
"https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v{{version}}/cloud-sql-proxy.{{exeOsArch}}",
downloadName: "cloud-sql-proxy{{exe}}",
},
"github-cli": {
repo: "cli/cli",
version: "2.62.0",
downloadUrl:
"/releases/download/v{{version}}/gh_{{version}}_{{os}}_{{arch}}.{{archive}}",
binPath: "/gh_{{version}}_{{os}}_{{arch}}/bin",
Expand Down

0 comments on commit 38052f9

Please sign in to comment.