Skip to content

Commit

Permalink
fix: Log progress and not print repo name to stdio
Browse files Browse the repository at this point in the history
  • Loading branch information
finom committed Sep 13, 2016
1 parent 8f7c736 commit 63626a1
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@ for(const field of fields) {
});
}

console.log('Deploying to git...');
console.log(`Cloning to ${config.folder}...`);
execSync(`git clone -b ${config.branch} ${config.repository} ${config.folder} 2>&1`, { cwd });

console.log(`Starting script ${config.script}...`);
console.log(execSync(`${config.script}`, { cwd }).toString('utf-8'));

console.log(`Configuring and committing...`);
execSync(`
git clone -b ${config.branch} ${config.repository} ${config.folder} &&
${config.script} &&
cd ${config.folder} &&
git config user.email "${config.user_email}" &&
git config user.name "${config.user_name}" &&
git add . &&
git commit --allow-empty -m "${config.commit}" &&
git push ${config.repository} ${config.branch}
git commit --allow-empty -m "${config.commit}" 2>&1
`, { cwd });

console.log(`Pushing...`);
execSync(`git push ${config.repository} ${config.branch}`, { cwd });

console.log('Deploying to git is finished.');

0 comments on commit 63626a1

Please sign in to comment.