Skip to content

Commit

Permalink
fix: log package name and version with logger
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed Jan 21, 2021
1 parent a2f2d7d commit f8ef74a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const _ = require('lodash')
const path = require('path')

module.exports = async (pluginConfig, { nextRelease: { version }, logger }) => {
logger.log(`Creating new package version ${pluginConfig.name}:${version}`)

const packageVersion = `${version}.0`
const config = {}
config.jwtkeyfile = pluginConfig.jwtkeyfile || 'assets/server.key'
config.clientid = pluginConfig.clientid || process.env['SFDX_CLIENT_ID']
Expand All @@ -15,13 +14,13 @@ module.exports = async (pluginConfig, { nextRelease: { version }, logger }) => {
const project = JSON.parse(fs.readFileSync('sfdx-project.json'))

const pkg = util.getPackage(project)
console.log(pkg)
logger.log(`Creating new package version ${pkg.package}:${packageVersion}`)
return sfdx.package
.versionCreate({
path: pkg.path,
targetdevhubusername: config.username,
tag: `${version}.0`,
versionnumber: `${version}.0`,
tag: packageVersion,
versionnumber: packageVersion,
json: true,
wait: pluginConfig.versionCreateWait || 15,
installationkeybypass: true,
Expand All @@ -41,6 +40,7 @@ module.exports = async (pluginConfig, { nextRelease: { version }, logger }) => {
)
})
.then(res => {
logger.log(`Package Version Create Result: ${JSON.stringify(res)}`)
logger.log('Generating README file')

const tmpl = fs.readFileSync(path.join(__dirname, '..', 'templates', 'Readme.tmpl'))
Expand Down

0 comments on commit f8ef74a

Please sign in to comment.