Skip to content

Commit

Permalink
chore: run lint:fix and build
Browse files Browse the repository at this point in the history
  • Loading branch information
s0 committed Nov 17, 2022
1 parent ac9c405 commit 65d1af0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
6 changes: 5 additions & 1 deletion action/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion action/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 6 additions & 3 deletions action/test/specs/ssh-target-dir-exists.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -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,
Expand Down Expand Up @@ -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',
{},
Expand Down
4 changes: 2 additions & 2 deletions action/test/specs/ssh-target-dir-no-exists.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down Expand Up @@ -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',
{},
Expand Down

0 comments on commit 65d1af0

Please sign in to comment.