Fixing the process output parsing.
This commit is contained in:
parent
ef34c9b398
commit
dadd8377fa
2 changed files with 12 additions and 2 deletions
|
@ -46,6 +46,13 @@ On any project within the build:
|
|||
|
||||
### Publishing a Release
|
||||
|
||||
If the `release` property is set, a release build will be produced. The valid
|
||||
values for `release` are:
|
||||
|
||||
- `major`
|
||||
- `minor`
|
||||
- `patch`
|
||||
|
||||
```
|
||||
sbt -Drelease=minor publish
|
||||
```
|
||||
|
|
|
@ -33,8 +33,11 @@ object Git {
|
|||
|
||||
if (result.exitCode != 0)
|
||||
SemVer.DefaultVersion
|
||||
else
|
||||
SemVer.parse(result.out.text()).getOrElse(SemVer.DefaultVersion)
|
||||
else {
|
||||
// Note: this value may contain newlines!
|
||||
val processOutput = result.out.text().trim()
|
||||
SemVer.parse(processOutput).getOrElse(SemVer.DefaultVersion)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue