Comparing version 4.0.5 to 5.0.0
{ | ||
"name": "dlvr", | ||
"version": "4.0.5", | ||
"version": "5.0.0", | ||
"description": "DeLiVeR - Command Line Tool to automate releasing processes on GitHub/GitLab/npm", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -70,4 +70,5 @@ # DLVR | ||
"filtermajor": ["breaking", "deprecate"], | ||
"preRun": "npm run build", | ||
"postRun": "rm -rf ./dist", | ||
"prerun": "rm -rf ./dist", | ||
"postrun": "", | ||
"posttag": "npm run build", | ||
"notify": true, | ||
@@ -74,0 +75,0 @@ "compress": [ |
@@ -29,3 +29,3 @@ const githook = { | ||
const prerun = { | ||
name: 'preRun', | ||
name: 'prerun', | ||
description: 'Execute a command before releasing ? (empty to dismiss)', | ||
@@ -36,3 +36,3 @@ type: 'string' | ||
const postrun = { | ||
name: 'postRun', | ||
name: 'postrun', | ||
description: 'Execute a command after releasing ? (empty to dismiss)', | ||
@@ -42,2 +42,8 @@ type: 'string' | ||
const posttag = { | ||
name: 'posttag', | ||
description: 'Execute a command after tag and commit ? (empty to dismiss)', | ||
type: 'string' | ||
}; | ||
const remote = { | ||
@@ -135,2 +141,3 @@ name: 'remote', | ||
postrun, | ||
posttag, | ||
remote, | ||
@@ -137,0 +144,0 @@ logfilter, |
@@ -91,2 +91,3 @@ const fs = require('fs'); | ||
common.postrun, | ||
common.posttag, | ||
common.remote, | ||
@@ -115,2 +116,3 @@ common.logfilter, | ||
common.postrun, | ||
common.posttag, | ||
common.remote, | ||
@@ -117,0 +119,0 @@ common.logfilter, |
@@ -5,4 +5,5 @@ let template = { | ||
remote: 'origin', | ||
preRun: 'npm run build', | ||
postRun: '', | ||
prerun: '', | ||
postrun: '', | ||
posttag: 'npm run build', | ||
test: 'npm run test', | ||
@@ -9,0 +10,0 @@ npmpublish: false, |
const spawn = require('child_process').spawn; | ||
const {bold, yellow} = require('chalk'); // eslint-disable-line no-unused-vars | ||
const spinner = require('../lib/spinner'); | ||
@@ -23,9 +24,12 @@ | ||
const preRun = ({cfg}) => | ||
runner(cfg.preRun, `Run ${cfg.preRun}`, 'Pre Run failed'); | ||
runner(cfg.prerun, `Run ${yellow.bold(cfg.prerun)}`, 'Pre Run failed'); | ||
const postTag = ({cfg}) => | ||
runner(cfg.posttag, `Run ${yellow.bold(cfg.posttag)}`, 'Post Tag failed'); | ||
const postRun = ({cfg}) => | ||
runner(cfg.postRun, `Run ${cfg.postRun}`, 'Post Run failed'); | ||
runner(cfg.postrun, `Run ${yellow.bold(cfg.postrun)}`, 'Post Run failed'); | ||
const runTests = ({cfg}) => runner(cfg.test, 'Run Test suites', 'Tests failed'); | ||
// yellow.bold(` | ||
module.exports = { | ||
@@ -35,3 +39,4 @@ runTests, | ||
preRun, | ||
postRun | ||
postRun, | ||
postTag | ||
}; |
@@ -34,9 +34,9 @@ #! /usr/bin/env node | ||
await zip.compress(configs); | ||
await utils.saveVersion(configs); | ||
await utils.cleanup(); | ||
await git.commitAndPush(configs); | ||
await runner.postTag(configs); | ||
await zip.compress(configs); | ||
await npm.publish(configs); | ||
const releaseId = await github.release(configs); | ||
@@ -43,0 +43,0 @@ |
63753
1892
117