Skip to content

Commit

Permalink
Set git user info for Homebrew committing
Browse files Browse the repository at this point in the history
The `git commit` command wants to set both an author and a committer.
The `--author` flag only sets the author,
leaving git without a value for the committer,
causing git to attempt to autodiscover that value.

To work around it, use the `-c` git flag to temporarily set the relevant
config variables for the scope of the command.
  • Loading branch information
aneeshusa committed Jan 13, 2017
1 parent cc8bee8 commit 9073566
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/ci/upload_nightly.sh
Expand Up @@ -52,8 +52,10 @@ update_brew() {
> "${tmp_dir}/Formula/servo-bin.rb"

git -C "${tmp_dir}" add ./Formula/servo-bin.rb
git -C "${tmp_dir}" commit \
--author="Tom Servo <servo@servo.org>" \
git -C "${tmp_dir}" \
-c user.name="Tom Servo" \
-c user.email="servo@servo.org" \
commit \
--message="Version bump: ${version}"

git -C "${tmp_dir}" push -qf \
Expand Down

0 comments on commit 9073566

Please sign in to comment.