Skip to content

Commit

Permalink
fix: move setup_git into greenkeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 2, 2018
1 parent 6e5fb0e commit b6c87d9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/generators/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class App extends Generator {
// if (this.semantic_release) {
// this.fs.copyTpl(this.templatePath('scripts/release'), this.destinationPath('.circleci/release'), this)
// }
this.fs.copyTpl(this.templatePath('scripts/setup_git'), this.destinationPath('.circleci/setup_git'), this)
// this.fs.copyTpl(this.templatePath('scripts/setup_git'), this.destinationPath('.circleci/setup_git'), this)
this.fs.copyTpl(this.templatePath('README.md.ejs'), this.destinationPath('README.md'), this)
this.fs.copyTpl(this.templatePath('circle.yml.ejs'), this.destinationPath('.circleci/config.yml'), this)
this.fs.copyTpl(this.templatePath('appveyor.yml.ejs'), this.destinationPath('appveyor.yml'), this)
Expand Down
4 changes: 0 additions & 4 deletions templates/appveyor.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ cache:

install:
- ps: Install-Product node $env:nodejs_version x64
- git submodule sync
- git submodule update --init --recursive
- git config --global user.email "anycli@example.com"
- git config --global user.name "anycli"
- yarn add -D nyc@11 @anycli/nyc-config@0
test_script:
<%_ if (type === 'single' || type === 'multi') { _%>
Expand Down
2 changes: 0 additions & 2 deletions templates/circle.yml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
steps:
- checkout
- attach_workspace: {at: node_modules}
- run: .circleci/setup_git
<%_ if (mocha) { _%>
- run: |
mkdir -p reports
Expand Down Expand Up @@ -85,7 +84,6 @@ jobs:
- attach_workspace: {at: node_modules}
- run: |
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
.circleci/setup_git
yarn global add @anycli/semantic-release@1 semantic-release@12
semantic-release -e @anycli/semantic-release
<%_ } _%>
Expand Down
6 changes: 6 additions & 0 deletions templates/scripts/greenkeeper
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
exit 0
fi

if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
git config --global push.default simple
git config --global user.email "$GIT_EMAIL"
git config --global user.name "$GIT_USERNAME"
fi

if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
yarn global add greenkeeper-lockfile@1
fi
Expand Down

0 comments on commit b6c87d9

Please sign in to comment.