Skip to content

Commit

Permalink
build: fix git user/email in publish (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccaffery authored Dec 18, 2019
1 parent b7a33b0 commit 1ce6870
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
set -eu

# set the git author and email
GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"[email protected]"}
GIT_COMMITTER_EMAIL=${GIT_COMMITTER_EMAIL:-$GIT_AUTHOR_EMAIL}
GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:="aM Open Source"}
GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME:-$GIT_AUTHOR_NAME}
GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"[email protected]"}

# set git user
git config user.name $GIT_AUTHOR_NAME
git config user.email $GIT_AUTHOR_EMAIL

# install yarn assets
yarn install --frozen-lockfile
Expand Down Expand Up @@ -39,10 +41,5 @@ yarn run release

# determine if we are running in ci
if ! test -z "${CI:-}"; then
GIT_AUTHOR_NAME=$GIT_AUTHOR_NAME \
GIT_AUTHOR_EMAIL=$GIT_AUTHOR_EMAIL \
EMAIL=$GIT_AUTHOR_EMAIL \
GIT_COMMITTER_NAME=$GIT_COMMITTER_EMAIL \
GIT_COMMITTER_EMAIL=$GIT_COMMITTER_EMAIL \
git push --follow-tags origin master
fi

0 comments on commit 1ce6870

Please sign in to comment.