Skip to content

Commit

Permalink
Merge pull request #16 from manabie-com/feature/custom-only-build-tar…
Browse files Browse the repository at this point in the history
…get-branch-and-show-more-info

update build
  • Loading branch information
phungtruongnguyen94 authored Feb 8, 2022
2 parents 461f36a + db343a2 commit 6d2d3fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ async function run(octokit, context, token, privateConfig) {
console.log("new size:")
console.log(newSizes)

const originDir = process.cwd()
const workDir = getInput('cwd')
process.chdir("../")
if (!fs.existsSync(workDir)){
fs.mkdirSync(workDir);
fse.copySync(process.cwd(), process.cwd() + workDir.replace(".", ""), {
fse.copySync(originDir, process.cwd() + workDir.replace(".", ""), {
overwrite: true,
filter: path => path.indexOf(workDir.replace("./", "")) > -1
})
process.chdir(workDir)
console.log(`change dir to ${workDir}`)
} else {
fse.copySync(process.cwd(), process.cwd() + workDir.replace(".", ""), {
fse.copySync(originDir, process.cwd() + workDir.replace(".", ""), {
overwrite: true,
filter: path => path.indexOf(workDir.replace("./", "")) > -1
})
Expand Down

0 comments on commit 6d2d3fa

Please sign in to comment.