Skip to content

Commit

Permalink
build: fix publish for prompt (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccaffery authored Dec 18, 2019
1 parent e124ce4 commit b7a33b0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
"main": "install.sh",
"repository": "https://github.com/automotivemastermind/prompt.git",
"scripts": {
"test": "bash install.sh",
"push": "git push --follow-tags origin master",
"version": "standard-version --message \"chore: release %s [skip ci]\"",
"release": "npm run version && npm run push"
"test": "sh install.sh",
"release": "standard-version --message \"chore: release %s [skip ci]\""
},
"keywords": [
"bash",
Expand Down
15 changes: 12 additions & 3 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ 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 config --set user.name $GIT_AUTHOR_NAME
git config --set user.email $GIT_AUTHOR_NAME
GIT_COMMITTER_NAME=${GIT_COMMITTER_NAME:-$GIT_AUTHOR_NAME}

# install yarn assets
yarn install --frozen-lockfile
Expand Down Expand Up @@ -37,3 +36,13 @@ fi

# create the release
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 b7a33b0

Please sign in to comment.