Skip to content

Commit

Permalink
Merge branch 'hotfix/0.12.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Dec 2, 2018
2 parents 08dedac + a06d67e commit 3ce4260
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [vNext]

## [0.12.4] / 2018-12-02
- Fixed `SolutionAttribute` to handle empty configuration file

## [0.12.3] / 2018-11-29
- Fixed `EnvironmentInfo.Variables` not to be cached
- Fixed `Glob` package reference in legacy template
Expand Down Expand Up @@ -216,7 +219,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added CLT tasks for Git
- Fixed background color in console output

[vNext]: https://github.com/nuke-build/nuke/compare/0.12.3...HEAD
[vNext]: https://github.com/nuke-build/nuke/compare/0.12.4...HEAD
[0.12.4]: https://github.com/nuke-build/nuke/compare/0.12.3...0.12.4
[0.12.3]: https://github.com/nuke-build/nuke/compare/0.12.2...0.12.3
[0.12.2]: https://github.com/nuke-build/nuke/compare/0.12.1...0.12.2
[0.12.1]: https://github.com/nuke-build/nuke/compare/0.12.0...0.12.1
Expand Down
10 changes: 6 additions & 4 deletions source/Nuke.Common/ProjectModel/SolutionAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ private string GetSolutionFile(string memberName)
private string GetSolutionFileFromConfigurationFile()
{
var nukeFile = Path.Combine(NukeBuild.RootDirectory, NukeBuild.ConfigurationFileName);
ControlFlow.Assert(File.Exists(nukeFile), $"File.Exists({NukeBuild.ConfigurationFileName})");
ControlFlow.Assert(File.Exists(nukeFile), $"File.Exists({nukeFile})");

var solutionFileRelative = File.ReadAllLines(nukeFile)[0];
ControlFlow.Assert(!solutionFileRelative.Contains(value: '\\'), $"{NukeBuild.ConfigurationFileName} must use unix-styled separators");
var solutionFileRelative = File.ReadAllLines(nukeFile).ElementAtOrDefault(0);
ControlFlow.Assert(solutionFileRelative != null && !solutionFileRelative.Contains(value: '\\'),
$"First line of {NukeBuild.ConfigurationFileName} must provide solution path using UNIX separators");

var solutionFile = Path.GetFullPath(Path.Combine(NukeBuild.RootDirectory, solutionFileRelative));
ControlFlow.Assert(File.Exists(solutionFile), $"Solution file '{solutionFile}' does not exist.");
ControlFlow.Assert(File.Exists(solutionFile),
$"Solution file '{solutionFile}' provided via {NukeBuild.CompletionFileName} does not exist.");

return (PathConstruction.AbsolutePath) solutionFile;
}
Expand Down

0 comments on commit 3ce4260

Please sign in to comment.