Don't shadow vars
This commit is contained in:
parent
f2c549b117
commit
bd74772a1a
12
dist/index.js
vendored
12
dist/index.js
vendored
@ -110,13 +110,13 @@ function repo() {
|
|||||||
if (!owner) {
|
if (!owner) {
|
||||||
throw new Error(`Could not extract 'owner' from 'repo_name': ${repo_name}.`);
|
throw new Error(`Could not extract 'owner' from 'repo_name': ${repo_name}.`);
|
||||||
}
|
}
|
||||||
const repo = repo_name.substr(repo_name.indexOf('/') + 1);
|
const repo_ = repo_name.substr(repo_name.indexOf('/') + 1);
|
||||||
if (!repo) {
|
if (!repo_) {
|
||||||
throw new Error(`Could not extract 'repo' from 'repo_name': ${repo_name}.`);
|
throw new Error(`Could not extract 'repo' from 'repo_name': ${repo_name}.`);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
owner,
|
owner,
|
||||||
repo
|
repo: repo_
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
@ -139,9 +139,9 @@ function run() {
|
|||||||
if (file_glob) {
|
if (file_glob) {
|
||||||
const files = glob.sync(file);
|
const files = glob.sync(file);
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
for (const file of files) {
|
for (const file_ of files) {
|
||||||
const asset_name = path.basename(file);
|
const asset_name = path.basename(file_);
|
||||||
const asset_download_url = yield upload_to_release(release, file, asset_name, tag, overwrite, octokit);
|
const asset_download_url = yield upload_to_release(release, file_, asset_name, tag, overwrite, octokit);
|
||||||
core.setOutput('browser_download_url', asset_download_url);
|
core.setOutput('browser_download_url', asset_download_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3364
package-lock.json
generated
3364
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -37,9 +37,9 @@
|
|||||||
"@types/node": "^16",
|
"@types/node": "^16",
|
||||||
"@typescript-eslint/parser": "^5",
|
"@typescript-eslint/parser": "^5",
|
||||||
"@vercel/ncc": "^0.36.0",
|
"@vercel/ncc": "^0.36.0",
|
||||||
"eslint": "^7.10.0",
|
"eslint": "^8",
|
||||||
"eslint-plugin-github": "^4.0.1",
|
"eslint-plugin-github": "^4.6",
|
||||||
"eslint-plugin-jest": "^23.17.1",
|
"eslint-plugin-jest": "^27",
|
||||||
"jest": "^29",
|
"jest": "^29",
|
||||||
"jest-circus": "^29",
|
"jest-circus": "^29",
|
||||||
"js-yaml": "^4",
|
"js-yaml": "^4",
|
||||||
|
12
src/main.ts
12
src/main.ts
@ -115,13 +115,13 @@ function repo(): {owner: string; repo: string} {
|
|||||||
if (!owner) {
|
if (!owner) {
|
||||||
throw new Error(`Could not extract 'owner' from 'repo_name': ${repo_name}.`)
|
throw new Error(`Could not extract 'owner' from 'repo_name': ${repo_name}.`)
|
||||||
}
|
}
|
||||||
const repo = repo_name.substr(repo_name.indexOf('/') + 1)
|
const repo_ = repo_name.substr(repo_name.indexOf('/') + 1)
|
||||||
if (!repo) {
|
if (!repo_) {
|
||||||
throw new Error(`Could not extract 'repo' from 'repo_name': ${repo_name}.`)
|
throw new Error(`Could not extract 'repo' from 'repo_name': ${repo_name}.`)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
owner,
|
owner,
|
||||||
repo
|
repo: repo_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,11 +153,11 @@ async function run(): Promise<void> {
|
|||||||
if (file_glob) {
|
if (file_glob) {
|
||||||
const files = glob.sync(file)
|
const files = glob.sync(file)
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
for (const file of files) {
|
for (const file_ of files) {
|
||||||
const asset_name = path.basename(file)
|
const asset_name = path.basename(file_)
|
||||||
const asset_download_url = await upload_to_release(
|
const asset_download_url = await upload_to_release(
|
||||||
release,
|
release,
|
||||||
file,
|
file_,
|
||||||
asset_name,
|
asset_name,
|
||||||
tag,
|
tag,
|
||||||
overwrite,
|
overwrite,
|
||||||
|
Loading…
Reference in New Issue
Block a user