From a8fc36ee8bf16ddc9c2ef9c9e378d5a7e4a4d6e0 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 20 Oct 2020 18:10:26 +0900 Subject: [PATCH] refactor: print log --- src/git-utils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/git-utils.ts b/src/git-utils.ts index a0fc759..4e9cbdf 100644 --- a/src/git-utils.ts +++ b/src/git-utils.ts @@ -6,7 +6,7 @@ import path from 'path'; import fs from 'fs'; import {Inputs, CmdResult} from './interfaces'; import {createDir} from './utils'; -import {cp} from 'shelljs'; +import {cp, ls} from 'shelljs'; export async function createBranchForce(branch: string): Promise { await exec.exec('git', ['init']); @@ -39,16 +39,17 @@ export async function copyAssets( ): Promise { core.info(`[INFO] prepare publishing assets`); - !fs.existsSync(destDir) && (await createDir(destDir)); - const dotGitPath = path.join(publishDir, '.git'); if (fs.existsSync(dotGitPath)) { core.info(`[INFO] delete ${dotGitPath}`); io.rmRF(dotGitPath); } + console.log(ls('-A', publishDir)); + console.log(ls('-A', destDir)); core.info(`[INFO] copy ${publishDir} to ${destDir}`); cp('-RfL', [`${publishDir}/*`, `${publishDir}/.*`], destDir); + console.log(ls('-A', destDir)); await deleteExcludedAssets(destDir, excludeAssets);