fix: More checks. Fix test for changelog generation
parent
c0f41727e6
commit
c6043fb4f9
|
@ -105,7 +105,6 @@ jobs:
|
|||
github-token: ${{ secrets.github_token }}
|
||||
pre-changelog-generation: test/pre-changelog-generation.js
|
||||
version-file: './test-file.toml'
|
||||
skip-on-empty: 'false'
|
||||
|
||||
- run: test -f pre-changelog-generation.test.json || (echo should be here && exit 1)
|
||||
- run: cat pre-changelog-generation.test.json
|
||||
|
|
|
@ -127,7 +127,12 @@ module.exports = new (class Git {
|
|||
isShallow = async () => {
|
||||
const isShallow = await this.exec('rev-parse --is-shallow-repository')
|
||||
|
||||
return isShallow.trim().replace('\n', '') === 'true'
|
||||
// isShallow does not return anything on local machine
|
||||
if (isShallow) {
|
||||
return isShallow.trim().replace('\n', '') === 'true'
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -118,8 +118,10 @@ async function run() {
|
|||
version: newVersion,
|
||||
})
|
||||
|
||||
gitTag = newVersionAndTag.tag
|
||||
newVersion = newVersionAndTag.version
|
||||
if (newVersionAndTag) {
|
||||
if (newVersionAndTag.tag) gitTag = newVersionAndTag.tag
|
||||
if (newVersionAndTag.version) newVersion = newVersionAndTag.version
|
||||
}
|
||||
}
|
||||
|
||||
// Generate the string changelog
|
||||
|
|
Loading…
Reference in New Issue