Publish-gh-pages should display the correct commit that triggers it (#829)

This commit is contained in:
Endilie Yacop Sucipto 2018-07-05 02:12:41 +08:00 committed by Yangshun Tay
parent 8d45669f92
commit 9c070f020d

View file

@ -84,6 +84,9 @@ if (shell.exec(`node ${path.join(__dirname, 'build-files.js')}`).code) {
shell.exit(1); shell.exit(1);
} }
// Save the commit hash that triggers publish-gh-pages before checking out to deployment branch
const currentCommit = shell.exec('git rev-parse HEAD').stdout.trim();
shell.cd(process.cwd()); shell.cd(process.cwd());
shell.cd('build'); shell.cd('build');
@ -154,9 +157,6 @@ fs.copy(
} }
shell.cd(path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`)); shell.cd(path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`));
const currentCommit = shell.exec('git rev-parse HEAD').stdout.trim();
shell.exec('git add --all'); shell.exec('git add --all');
const commitResults = shell.exec( const commitResults = shell.exec(