fix: Show info if the version couldn't be detected

releases/v3
Jayrgo 2020-08-11 20:02:59 +02:00
parent 283100b0c8
commit 9a324dbd51
No known key found for this signature in database
GPG Key ID: 498EE77E1F8E0A1E
3 changed files with 4 additions and 2 deletions

View File

@ -19,7 +19,7 @@ This action will bump version, tag commit and generate a changelog with conventi
- **Optional** `skip-version-file`: Do not update the version file. Default `'false'`.
- **Optional** `skip-commit`: Do create a release commit. Default `'false'`.
- **Optional** `pre-commit`: Path to the pre-commit script file. No hook by default.
- **Optional** `fallback-version`: The fallback version, if none is recognized. Default `'0.1.0'`
- **Optional** `fallback-version`: The fallback version, if no older one can be detected, or if it is the first one. Default `'0.1.0'`
### Pre-Commit hook

View File

@ -84,7 +84,7 @@ inputs:
required: false
fallback-version:
description: 'The fallback version, if none is recognized'
description: 'The fallback version, if no older one can be detected, or if it is the first one'
default: '0.1.0'
required: false

View File

@ -42,5 +42,7 @@ module.exports = (releaseType, version) => {
}
}
core.info(`The version could not be detected, the new version is '${major}.${minor}.${patch}'.`)
return `${major}.${minor}.${patch}`
}