-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from stormid/feature/fix-build
Add updated cake mix files
- Loading branch information
Showing
18 changed files
with
299 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#load "Configuration.cake" | ||
|
||
public static Configuration IncludeArtifactCopyTarget(this Configuration configuration, DirectoryPath sourceDirectory) | ||
{ | ||
var copyList = new HashSet<DirectoryPath>(); | ||
if(configuration.TaskParameters.TryGetValue("Artifacts:Copy__Items", out object value) && value is HashSet<DirectoryPath>) | ||
{ | ||
copyList = value as HashSet<DirectoryPath>; | ||
} | ||
else | ||
{ | ||
configuration.TaskParameters.Add("Artifacts:Copy__Items", copyList); | ||
} | ||
|
||
copyList.Add(sourceDirectory); | ||
|
||
return configuration; | ||
} | ||
|
||
public static bool HasArtifactCopyTargets(this Configuration configuration) | ||
{ | ||
var copyList = new HashSet<DirectoryPath>(); | ||
if(configuration.TaskParameters.TryGetValue("Artifacts:Copy__Items", out object value) && value is HashSet<DirectoryPath>) | ||
{ | ||
copyList = value as HashSet<DirectoryPath>; | ||
} | ||
|
||
return copyList.Any(); | ||
} | ||
|
||
public static IEnumerable<DirectoryPath> GetArtifactCopyTargets(this Configuration configuration) | ||
{ | ||
var copyList = new HashSet<DirectoryPath>(); | ||
if(configuration.TaskParameters.TryGetValue("Artifacts:Copy__Items", out object value) && value is HashSet<DirectoryPath>) | ||
{ | ||
copyList = value as HashSet<DirectoryPath>; | ||
} | ||
return copyList; | ||
} | ||
|
||
Task("Artifacts:Copy") | ||
.WithCriteria<Configuration>((ctx, config) => config.HasArtifactCopyTargets()) | ||
.IsDependentOn("Build") | ||
.IsDependeeOf("Publish") | ||
.Does<Configuration>(config => | ||
{ | ||
var artifacts = $"{config.Artifacts.Root}"; | ||
EnsureDirectoryExists(artifacts); | ||
foreach(var directory in config.GetArtifactCopyTargets()) | ||
{ | ||
var copyFrom = directory; | ||
var copyTo = $"{artifacts}/{directory.GetDirectoryName()}"; | ||
Information("{0} -> {1}", copyFrom, copyTo); | ||
EnsureDirectoryExists(copyTo); | ||
CopyDirectory(directory, copyTo); | ||
config.Artifacts.Add(ArtifactTypeOption.Other, directory.GetDirectoryName(), directory.FullPath); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#load "CI-VSTS.cake" | ||
#load "CI-Azure-DevOps.cake" | ||
#load "CI-AppVeyor.cake" | ||
|
||
Task("CI") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.