-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(tasks): add renovate task, and run it
run renovate task on postinstall and in precommit TAG: latest
- Loading branch information
tunnckoCore
committed
Aug 10, 2017
1 parent
e1d5de8
commit 24e5240
Showing
6 changed files
with
121 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"enabled": true, | ||
"pinVersions": true, | ||
"rebaseStalePrs": true, | ||
"semanticCommits": true, | ||
"unpublishSafe": false, | ||
"labels": [ | ||
"deps", | ||
"renovate" | ||
], | ||
"prCreation": "not-pending", | ||
"depTypes": [ | ||
{ | ||
"depType": "dependencies", | ||
"semanticPrefix": "fix(renovate/deps): ", | ||
"automerge": "minor", | ||
"automergeType": "pr", | ||
"assignees": [ | ||
"charlike" | ||
] | ||
}, | ||
{ | ||
"depType": "devDependencies", | ||
"semanticPrefix": "chore(renovate/devDeps): ", | ||
"automerge": "any", | ||
"automergeType": "branch-push" | ||
} | ||
], | ||
"packageRules": [ | ||
{ | ||
"packageNames": [ | ||
"semantic-release" | ||
], | ||
"automerge": "minor", | ||
"automergeType": "pr", | ||
"pinVersions": false | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"enabled": true, | ||
"pinVersions": true, | ||
"rebaseStalePrs": true, | ||
"semanticCommits": true, | ||
"unpublishSafe": false, | ||
"labels": [ | ||
"deps", | ||
"renovate" | ||
], | ||
"prCreation": "not-pending", | ||
"depTypes": [ | ||
{ | ||
"depType": "dependencies", | ||
"semanticPrefix": "fix(renovate/deps): ", | ||
"automerge": "minor", | ||
"automergeType": "pr", | ||
"assignees": [ | ||
"charlike" | ||
] | ||
}, | ||
{ | ||
"depType": "devDependencies", | ||
"semanticPrefix": "chore(renovate/devDeps): ", | ||
"automerge": "any", | ||
"automergeType": "branch-push" | ||
} | ||
], | ||
"packageRules": [ | ||
{ | ||
"packageNames": [ | ||
"semantic-release" | ||
], | ||
"automerge": "minor", | ||
"automergeType": "pr", | ||
"pinVersions": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*! | ||
* hela <https://github.com/tunnckoCore/hela> | ||
* | ||
* Copyright (c) 2017 Charlike Mike Reagent <[email protected]> (https://i.am.charlike.online) | ||
* Released under the MIT license. | ||
*/ | ||
|
||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
const readFile = (fp) => | ||
new Promise((resolve, reject) => { | ||
fs.readFile(fp, 'utf8', (er, res) => { | ||
if (er) return reject(er) | ||
resolve(res) | ||
}) | ||
}) | ||
|
||
const writeFile = (fp, data) => | ||
new Promise((resolve, reject) => { | ||
fs.writeFile(path.join(process.cwd(), fp), data, (er, res) => { | ||
if (er) return reject(er) | ||
resolve(res) | ||
}) | ||
}) | ||
|
||
module.exports = ({ app }) => { | ||
console.log('Updating Renovate App config...') | ||
const helaFolder = path.dirname(__dirname) | ||
const localConfig = path.join(helaFolder, '.renovaterc.json') | ||
|
||
const writeRenovate = (config) => | ||
writeFile('renovate.json', JSON.stringify(config, null, 2)) | ||
|
||
readFile(localConfig).then(JSON.parse).then(writeRenovate) | ||
// shell('simple-commit-message') | ||
} |