fix: Fixed awaits missing
parent
609a140e1f
commit
35206c5104
|
@ -10,7 +10,7 @@ const requireScript = require('./requireScript')
|
|||
* @param version
|
||||
* @returns {string}
|
||||
*/
|
||||
module.exports = (releaseType, version) => {
|
||||
module.exports = async (releaseType, version) => {
|
||||
let major, minor, patch
|
||||
|
||||
if (version) {
|
||||
|
@ -55,7 +55,7 @@ module.exports = (releaseType, version) => {
|
|||
|
||||
// Double check if we want to update / do something with the version
|
||||
if (preChangelogGenerationScript && preChangelogGenerationScript.preVersionGeneration) {
|
||||
const modifiedVersion = preChangelogGenerationScript.preVersionGeneration(newVersion)
|
||||
const modifiedVersion = await preChangelogGenerationScript.preVersionGeneration(newVersion)
|
||||
|
||||
if (modifiedVersion) {
|
||||
newVersion = modifiedVersion
|
||||
|
|
|
@ -120,7 +120,7 @@ async function run() {
|
|||
|
||||
// Double check if we want to update / do something with the tag
|
||||
if (preChangelogGenerationScript && preChangelogGenerationScript.preTagGeneration) {
|
||||
const modifiedTag = preChangelogGenerationScript.preTagGeneration(gitTag)
|
||||
const modifiedTag = await preChangelogGenerationScript.preTagGeneration(gitTag)
|
||||
|
||||
if (modifiedTag) {
|
||||
gitTag = modifiedTag
|
||||
|
@ -153,11 +153,11 @@ async function run() {
|
|||
if (!skipCommit) {
|
||||
// Add changed files to git
|
||||
if (preCommitFile) {
|
||||
const preCommitScript = await requireScript(preCommitFile)
|
||||
const preCommitScript = requireScript(preCommitFile)
|
||||
|
||||
// Double check if the file exists and the export exists
|
||||
if (preCommitScript && preCommitScript.preCommit) {
|
||||
preCommitScript.preCommit({
|
||||
await preCommitScript.preCommit({
|
||||
tag: gitTag,
|
||||
version: newVersion,
|
||||
})
|
||||
|
|
|
@ -12,11 +12,11 @@ module.exports = new (class Git extends BaseVersioning {
|
|||
|
||||
gitSemverTags({
|
||||
tagPrefix,
|
||||
}, (err, tags) => {
|
||||
}, async (err, tags) => {
|
||||
const currentVersion = tags.length > 0 ? tags.shift().replace(tagPrefix, '') : null
|
||||
|
||||
// Get the new version
|
||||
this.newVersion = bumpVersion(
|
||||
this.newVersion = await bumpVersion(
|
||||
releaseType,
|
||||
currentVersion,
|
||||
)
|
||||
|
|
|
@ -12,7 +12,7 @@ module.exports = new (class Json extends BaseVersioning {
|
|||
* @param {!string} releaseType - The type of release
|
||||
* @return {*}
|
||||
*/
|
||||
bump = (releaseType) => {
|
||||
bump = async (releaseType) => {
|
||||
// Read the file
|
||||
const fileContent = this.read()
|
||||
|
||||
|
@ -33,7 +33,7 @@ module.exports = new (class Json extends BaseVersioning {
|
|||
const oldVersion = objectPath.get(jsonContent, this.versionPath, null)
|
||||
|
||||
// Get the new version
|
||||
this.newVersion = bumpVersion(
|
||||
this.newVersion = await bumpVersion(
|
||||
releaseType,
|
||||
oldVersion,
|
||||
)
|
||||
|
|
|
@ -12,14 +12,14 @@ module.exports = new (class Toml extends BaseVersioning{
|
|||
* @param {!string} releaseType - The type of release
|
||||
* @return {*}
|
||||
*/
|
||||
bump = (releaseType) => {
|
||||
bump = async(releaseType) => {
|
||||
// Read the file
|
||||
const fileContent = this.read()
|
||||
const tomlContent = toml.parse(fileContent)
|
||||
const oldVersion = objectPath.get(tomlContent, this.versionPath, null)
|
||||
|
||||
// Get the new version
|
||||
this.newVersion = bumpVersion(
|
||||
this.newVersion = await bumpVersion(
|
||||
releaseType,
|
||||
oldVersion,
|
||||
)
|
||||
|
|
|
@ -12,14 +12,14 @@ module.exports = new (class Yaml extends BaseVersioning{
|
|||
* @param {!string} releaseType - The type of release
|
||||
* @return {*}
|
||||
*/
|
||||
bump = (releaseType) => {
|
||||
bump = async (releaseType) => {
|
||||
// Read the file
|
||||
const fileContent = this.read()
|
||||
const yamlContent = yaml.parse(fileContent) || {}
|
||||
const oldVersion = objectPath.get(yamlContent, this.versionPath, null)
|
||||
|
||||
// Get the new version
|
||||
this.newVersion = bumpVersion(
|
||||
this.newVersion =await bumpVersion(
|
||||
releaseType,
|
||||
oldVersion,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue