Skip to content

Commit

Permalink
Trim and reference branch correctly during deployment (#716)
Browse files Browse the repository at this point in the history
Otherwise it may contain a trailing \n
  • Loading branch information
gustavohenke authored and yangshun committed Jun 2, 2018
1 parent 48343db commit 93b2ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/publish-gh-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ if (!shell.which('git')) {
const siteConfig = require(process.cwd() + '/siteConfig.js');
const GIT_USER = process.env.GIT_USER;
const CURRENT_BRANCH =
process.env.CIRCLE_BRANCH || shell.exec('git rev-parse --abbrev-ref HEAD');
process.env.CIRCLE_BRANCH ||
shell.exec('git rev-parse --abbrev-ref HEAD').stdout.trim();
const ORGANIZATION_NAME =
process.env.ORGANIZATION_NAME ||
process.env.CIRCLE_PROJECT_USERNAME ||
Expand Down

0 comments on commit 93b2ebb

Please sign in to comment.