mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-25 04:12:17 +01:00
chore: change printWidth from 80 to 100 (#365)
This commit is contained in:
@@ -12,11 +12,7 @@ export function getURL(org: string, repo: string, api: string): string {
|
||||
return url;
|
||||
}
|
||||
|
||||
export async function getLatestVersion(
|
||||
org: string,
|
||||
repo: string,
|
||||
api: string
|
||||
): Promise<string> {
|
||||
export async function getLatestVersion(org: string, repo: string, api: string): Promise<string> {
|
||||
const url = getURL(org, repo, api);
|
||||
const response = await fetch(url);
|
||||
const json = await response.json();
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
export default function getURL(
|
||||
os: string,
|
||||
extended: string,
|
||||
version: string
|
||||
): string {
|
||||
export default function getURL(os: string, extended: string, version: string): string {
|
||||
const extendedStr = (extended: string): string => {
|
||||
if (extended === 'true') {
|
||||
return 'extended_';
|
||||
|
||||
@@ -59,16 +59,10 @@ export async function installer(version: string): Promise<void> {
|
||||
const toolAssets: string = await tc.downloadTool(toolURL);
|
||||
let toolBin = '';
|
||||
if (process.platform === 'win32') {
|
||||
const toolExtractedFolder: string = await tc.extractZip(
|
||||
toolAssets,
|
||||
tempDir
|
||||
);
|
||||
const toolExtractedFolder: string = await tc.extractZip(toolAssets, tempDir);
|
||||
toolBin = `${toolExtractedFolder}/${Tool.CmdName}.exe`;
|
||||
} else {
|
||||
const toolExtractedFolder: string = await tc.extractTar(
|
||||
toolAssets,
|
||||
tempDir
|
||||
);
|
||||
const toolExtractedFolder: string = await tc.extractTar(toolAssets, tempDir);
|
||||
toolBin = `${toolExtractedFolder}/${Tool.CmdName}`;
|
||||
}
|
||||
await io.mv(toolBin, binDir);
|
||||
|
||||
@@ -9,10 +9,7 @@ export interface ActionResult {
|
||||
output: string;
|
||||
}
|
||||
|
||||
export async function showVersion(
|
||||
cmd: string,
|
||||
args: string[]
|
||||
): Promise<ActionResult> {
|
||||
export async function showVersion(cmd: string, args: string[]): Promise<ActionResult> {
|
||||
const result: ActionResult = {
|
||||
exitcode: 0,
|
||||
output: ''
|
||||
|
||||
Reference in New Issue
Block a user