Skip to content

Commit

Permalink
fix: download url for cli
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Dec 1, 2023
1 parent 0fd4d6e commit 273d9b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/releases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { GITHUB_DEFAULT_HEADERS } from './config'
import { obtainVersion } from './command'

const downloadBase = 'https://dl.less.build'
const downloadPathV1 = 'cli/'
const downloadPathV1 = 'cli'

/**
* Version info resolved for a release of Buildless.
Expand Down Expand Up @@ -107,8 +107,8 @@ function buildDownloadUrl(
return {
archiveType,
url: new URL(
// https://... / cli/v1/snapshot / (os)-(arch) / buildless.(extension)
`${downloadBase}/${downloadPathV1}/${options.os}-${options.arch}/${version.tag_name}/buildless.${ext}`
// https://... / cli / (version) / (os)-(arch) / cli.(extension)
`${downloadBase}/${downloadPathV1}/${version.tag_name}/${options.os}-${options.arch}/cli.${ext}`
)
}
}
Expand Down Expand Up @@ -174,6 +174,7 @@ export async function resolveLatestVersion(
): Promise<BuildlessVersionInfo> {
/* istanbul ignore next */
const octokit = token ? github.getOctokit(token) : new Octokit({})
core.debug(`Fetching latest CLI releases...`)
const latest = await octokit.request(
'GET /repos/{owner}/{repo}/releases/latest',
{
Expand Down

0 comments on commit 273d9b8

Please sign in to comment.