hotfix(pkg): fix edge versioning

This commit is contained in:
Pooya Parsa 2018-11-28 22:14:11 +03:30
parent 056704f17c
commit 2f1e0045cc
2 changed files with 9 additions and 9 deletions

View File

@ -27,8 +27,8 @@ async function main() {
// Step 1: Apply suffixes
for (const pkg of workspacePackages) {
if (pkg.options.suffix && pkg.options.suffix.length) {
pkg.suffixAndVersion()
pkg.writePackage()
await pkg.suffixAndVersion()
await pkg.writePackage()
}
}

View File

@ -1,6 +1,6 @@
import { resolve } from 'path'
import consola from 'consola'
import { spawn } from 'cross-spawn'
import spawn from 'cross-spawn'
import { existsSync, readJSONSync, writeFile, copy, remove } from 'fs-extra'
import _ from 'lodash'
import { rollup, watch } from 'rollup'
@ -307,8 +307,8 @@ export default class Package {
}
}
async exec(command, args, silent = false) {
const r = await spawn(command, args.split(' '), { cwd: this.options.rootDir }, { env: process.env })
exec(command, args, silent = false) {
const r = spawn.sync(command, args.split(' '), { cwd: this.options.rootDir }, { env: process.env })
if (!silent) {
const fullCommand = command + ' ' + args
@ -333,13 +333,13 @@ export default class Package {
}
}
async gitShortCommit() {
const { stdout } = await this.exec('git', 'rev-parse --short HEAD', true)
gitShortCommit() {
const { stdout } = this.exec('git', 'rev-parse --short HEAD', true)
return stdout
}
async gitBranch() {
const { stdout } = await this.exec('git', 'rev-parse --abbrev-ref HEAD', true)
gitBranch() {
const { stdout } = this.exec('git', 'rev-parse --abbrev-ref HEAD', true)
return stdout
}
}