Skip to content

Commit

Permalink
chore(build): Read commit message from file
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Apr 27, 2017
1 parent faffdc8 commit 3a11965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions build/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ export async function publishToRepo(config: Config) {
const REPO_DIR = `./tmp/${pkg}`;
const SHA = await util.git([`rev-parse HEAD`]);
const SHORT_SHA = await util.git([`rev-parse --short HEAD`]);
const COMMIT_MSG = await util.git([`log --oneline -1`]);
const COMMITTER_USER_NAME = await util.git([`--no-pager show -s --format='%cN' HEAD`]);
const COMMITTER_USER_EMAIL = await util.git([`--no-pager show -s --format='%cE' HEAD`]);

Expand All @@ -222,14 +221,14 @@ export async function publishToRepo(config: Config) {
await util.git(['checkout -b master']);
await process.chdir('../../');
await util.cmd('rm -rf', [`${REPO_DIR}/*`]);
await util.git([`log --format="%h %s%n" -n 1 > ${REPO_DIR}/commit_message`]);
await util.cmd('cp', [`-R ${SOURCE_DIR}/* ${REPO_DIR}/`]);
await process.chdir(`${REPO_DIR}`);
await util.git([`config user.name "${COMMITTER_USER_NAME}"`]);
await util.git([`config user.email "${COMMITTER_USER_EMAIL}"`]);
await util.git(['add --all']);
await util.cmd('echo', [`"${COMMIT_MSG.replace(/\r?\n|\r/g, '')}" > commit_message`]);
await util.git([`commit -F commit_message`]);
await util.git(['push origin master --force']);
//await util.git(['push origin master --force']);
await process.chdir('../../');
}
}
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ test:
deployment:
builds:
owner: ngrx
branch: master
commands:
- yarn run deploy:builds

0 comments on commit 3a11965

Please sign in to comment.