From 65d1af0def93abd0ac54cb2be340531841dac460 Mon Sep 17 00:00:00 2001 From: Sam Lanning Date: Thu, 17 Nov 2022 23:04:41 +0000 Subject: [PATCH] chore: run lint:fix and build --- action/dist/index.js | 6 +++++- action/src/index.ts | 6 +++++- action/test/specs/ssh-target-dir-exists.spec.ts | 9 ++++++--- action/test/specs/ssh-target-dir-no-exists.spec.ts | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/action/dist/index.js b/action/dist/index.js index 7d9ce6f..d453fdc 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -12306,7 +12306,11 @@ const main = async ({ env = process.env, log, }) => { await (0, io_1.mkdirP)(path.resolve(REPO_TEMP, destinationFolder)); log.log(`##[info] Copying all files from ${folder}`); // TODO: replace this copy with a node implementation - await (0, exports.exec)(`cp -rT "${folder}"/ ${destinationFolder}`, { log, env: childEnv, cwd: REPO_TEMP }); + await (0, exports.exec)(`cp -rT "${folder}"/ ${destinationFolder}`, { + log, + env: childEnv, + cwd: REPO_TEMP, + }); await (0, exports.exec)(`git add -A .`, { log, env: childEnv, cwd: REPO_TEMP }); const message = config.message .replace(/\{target\-branch\}/g, config.branch) diff --git a/action/src/index.ts b/action/src/index.ts index 7cc6c27..de95f11 100644 --- a/action/src/index.ts +++ b/action/src/index.ts @@ -580,7 +580,11 @@ export const main = async ({ log.log(`##[info] Copying all files from ${folder}`); // TODO: replace this copy with a node implementation - await exec(`cp -rT "${folder}"/ ${destinationFolder}`, { log, env: childEnv, cwd: REPO_TEMP }); + await exec(`cp -rT "${folder}"/ ${destinationFolder}`, { + log, + env: childEnv, + cwd: REPO_TEMP, + }); await exec(`git add -A .`, { log, env: childEnv, cwd: REPO_TEMP }); const message = config.message .replace(/\{target\-branch\}/g, config.branch) diff --git a/action/test/specs/ssh-target-dir-exists.spec.ts b/action/test/specs/ssh-target-dir-exists.spec.ts index 469d7f4..2f820b4 100644 --- a/action/test/specs/ssh-target-dir-exists.spec.ts +++ b/action/test/specs/ssh-target-dir-exists.spec.ts @@ -7,7 +7,7 @@ import { prepareTestFolders } from '../util/io'; import { listTree } from '../util/git'; it('Deploy to a branch on a custom dir that exists', async () => { - const folders = await prepareTestFolders({ __filename }); + const folders = await prepareTestFolders({ __filename }); // Create empty repo await util.wrappedExec('git init --bare', { cwd: folders.repoDir }); @@ -23,7 +23,10 @@ it('Deploy to a branch on a custom dir that exists', async () => { await fs.writeFile(path.join(folders.repoCloneDir, 'folder', 'b'), 'foobar2'); await mkdirP(path.join(folders.repoCloneDir, 'custom', 'b')); await fs.writeFile(path.join(folders.repoCloneDir, 'custom', 'a'), 'foobar1'); - await fs.writeFile(path.join(folders.repoCloneDir, 'custom', 'b', 'c'), 'foobar1'); + await fs.writeFile( + path.join(folders.repoCloneDir, 'custom', 'b', 'c'), + 'foobar1' + ); await util.wrappedExec(`git add -A .`, { cwd: folders.repoCloneDir }); await util.wrappedExec(`git config user.name "Test User"`, { cwd: folders.repoCloneDir, @@ -52,7 +55,7 @@ it('Deploy to a branch on a custom dir that exists', async () => { FOLDER: folders.dataDir, SSH_PRIVATE_KEY: (await fs.readFile(util.SSH_PRIVATE_KEY)).toString(), KNOWN_HOSTS_FILE: util.KNOWN_HOSTS, - TARGET_DIR: 'custom' + TARGET_DIR: 'custom', }, 's0/test', {}, diff --git a/action/test/specs/ssh-target-dir-no-exists.spec.ts b/action/test/specs/ssh-target-dir-no-exists.spec.ts index d769a7f..39e009b 100644 --- a/action/test/specs/ssh-target-dir-no-exists.spec.ts +++ b/action/test/specs/ssh-target-dir-no-exists.spec.ts @@ -7,7 +7,7 @@ import { prepareTestFolders } from '../util/io'; import { listTree } from '../util/git'; it('Deploy to a branch on a custom dir that does not exist', async () => { - const folders = await prepareTestFolders({ __filename }); + const folders = await prepareTestFolders({ __filename }); // Create empty repo await util.wrappedExec('git init --bare', { cwd: folders.repoDir }); @@ -49,7 +49,7 @@ it('Deploy to a branch on a custom dir that does not exist', async () => { FOLDER: folders.dataDir, SSH_PRIVATE_KEY: (await fs.readFile(util.SSH_PRIVATE_KEY)).toString(), KNOWN_HOSTS_FILE: util.KNOWN_HOSTS, - TARGET_DIR: 'custom' + TARGET_DIR: 'custom', }, 's0/test', {},