Skip to content

Commit

Permalink
chore: add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnderScorer committed Nov 23, 2023
1 parent a8cb9e4 commit b997278
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions scripts/downloadGithubReleasePackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,26 @@ async function main() {
throw new Error('TAG environment variable is required')
}

const githubRelease: GithubRelease = await fetch(
`https://api.github.com/repos/${config.repositoryOwner}/${config.repository}/releases/tags/${tag}`,
{
headers: token
? {
Authorization: bearer(token),
}
: undefined,
},
).then((res) => res.json())
console.debug('tag', tag)

const url = `https://api.github.com/repos/${config.repositoryOwner}/${config.repository}/releases/tags/${tag}`

console.debug('url', url)

const githubRelease: GithubRelease = await fetch(url, {
headers: token
? {
Authorization: bearer(token),
}
: undefined,
}).then((res) => res.json())

console.debug('githubRelease', githubRelease)

const functionZip = await findFunctionZip(githubRelease.assets)

console.debug('functionZip', functionZip)

if (!functionZip) {
throw new Error('No function zip found')
}
Expand Down

0 comments on commit b997278

Please sign in to comment.