Created
October 13, 2016 16:31
-
-
Save wekempf/cf029b93abf2399a6a4dee89386df2e2 to your computer and use it in GitHub Desktop.
Cake build script for Wyam.
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
#tool nuget:?package=Wyam&prerelease | |
#addin nuget:?package=Cake.Wyam&prerelease | |
////////////////////////////////////////////////////////////////////// | |
// ARGUMENTS | |
////////////////////////////////////////////////////////////////////// | |
var target = Argument("target", "Default"); | |
////////////////////////////////////////////////////////////////////// | |
// PREPARATION | |
////////////////////////////////////////////////////////////////////// | |
var isLocal = BuildSystem.IsLocalBuild; | |
var isRunningOnUnix = IsRunningOnUnix(); | |
var isRunningOnWindows = IsRunningOnWindows(); | |
var isRunningOnAppVeyor = AppVeyor.IsRunningOnAppVeyor; | |
var isPullRequest = AppVeyor.Environment.PullRequest.IsPullRequest; | |
////////////////////////////////////////////////////////////////////// | |
// TASKS | |
////////////////////////////////////////////////////////////////////// | |
Task("Build") | |
.Does(() => | |
{ | |
Wyam(new WyamSettings | |
{ | |
Recipe = "Blog", | |
Theme = "CleanBlog" | |
}); | |
}); | |
Task("Preview") | |
.Does(() => | |
{ | |
Wyam(new WyamSettings | |
{ | |
Recipe = "Blog", | |
Theme = "CleanBlog", | |
Preview = true, | |
Watch = true | |
}); | |
}); | |
////////////////////////////////////////////////////////////////////// | |
// TASK TARGETS | |
////////////////////////////////////////////////////////////////////// | |
Task("Default") | |
.IsDependentOn("Preview"); | |
Task("AppVeyor") | |
.IsDependentOn("Build"); | |
////////////////////////////////////////////////////////////////////// | |
// EXECUTION | |
////////////////////////////////////////////////////////////////////// | |
RunTarget(target); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment