workflow: include commit link in template explorer

This commit is contained in:
Evan You
2019-10-04 22:40:54 -04:00
parent ea4a352ee6
commit a0f442f1d4
6 changed files with 38 additions and 7 deletions

View File

@@ -22,10 +22,19 @@ const { targets, fuzzyMatchTarget } = require('./utils')
const args = require('minimist')(process.argv.slice(2))
const target = args._.length ? fuzzyMatchTarget(args._)[0] : 'vue'
const formats = args.formats || args.f
const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7)
execa(
'rollup',
['-wc', '--environment', `TARGET:${target},FORMATS:${formats || 'global'}`],
[
'-wc',
'--environment',
[
`COMMIT:${commit}`,
`TARGET:${target}`,
`FORMATS:${formats || 'global'}`
].join(',')
],
{
stdio: 'inherit'
}