From e56a8dc0ce4942508d4c09000f09690553565416 Mon Sep 17 00:00:00 2001 From: Jayrgo <13069032+Jayrgo@users.noreply.github.com> Date: Sat, 8 Aug 2020 22:44:50 +0200 Subject: [PATCH] fix: Git tags empty --- src/helpers/git.js | 2 +- src/version/git.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/git.js b/src/helpers/git.js index de5c185..930a0c2 100644 --- a/src/helpers/git.js +++ b/src/helpers/git.js @@ -97,7 +97,7 @@ module.exports = new (class Git { * @return {Promise<>} */ pull = () => ( - this.exec(`pull --unshallow ${core.getInput('git-pull-method')}`) + this.exec(`pull ${core.getInput('git-pull-method')}`) ) /** diff --git a/src/version/git.js b/src/version/git.js index b73cc38..0a0743c 100644 --- a/src/version/git.js +++ b/src/version/git.js @@ -13,7 +13,7 @@ module.exports = new (class Git extends BaseVersioning { gitSemverTags({ tagPrefix, }, (err, tags) => { - const currentVersion = tags.shift().replace(tagPrefix, '') + const currentVersion = tags.length > 0 ? tags.shift().replace(tagPrefix, '') : '0.1.0' // Get the new version this.newVersion = bumpVersion(