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