1 Star 0 Fork 0

OpenSharperSync/NAudio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.fsx 3.21 KB
一键复制 编辑 原始数据 按行查看 历史
Mark Heath 提交于 2019-05-04 10:58 . updating for 1.9.0 release
#r "packages/FAKE/tools/FakeLib.dll"
open Fake
open System.IO
open Fake.Testing
let buildDir = "" // using the defaults build output
let appReferences = !! "./*.sln" // still building from the solution
let deployDir = "./BuildArtefacts/"
let testDir = "./NAudioTests/bin/Debug/"
let testDlls = !! (testDir + "*Tests.dll")
let buildLogo = """ _ _ _ _ _
| \ | | / \ _ _ __| (_) ___
| \| | / _ \| | | |/ _` | |/ _ \
| |\ |/ ___ \ |_| | (_| | | (_) |
|_| \_/_/ \_\__,_|\__,_|_|\___/
"""
traceHeader buildLogo
Target "DebugBuild" (fun _ ->
MSBuildDebug buildDir "Build" appReferences
|> ignore //Log "Build output: "
)
Target "ReleaseBuild" (fun _ ->
MSBuildRelease buildDir "Build" appReferences
|> Log "Build output: "
)
Target "Test" (fun _ ->
trace "Running unit tests"
testDlls
|> NUnit3 (fun p ->
{p with
Where = "cat != IntegrationTest";
ShadowCopy = true;
ResultSpecs = [testDir + "TestResults.xml"]})
)
Target "Clean" (fun _ ->
trace "Cleaning up"
MSBuildDebug buildDir "Clean" appReferences
|> Log "Debug clean: "
MSBuildRelease buildDir "Clean" appReferences
|> Log "Release clean: "
CleanDirs [deployDir]
)
Target "NuGet" (fun _ ->
(*NuGetDefaults()
|> sprintf "%A"
|> trace*)
NuGet (fun p ->
{p with
(*Authors = authors
Project = projectName
Description = projectDescription
Summary = projectSummary
WorkingDir = packagingDir
AccessKey = myAccesskey*)
Version = "1.9.0" // todo get the version number from elsewhere
WorkingDir = "."
OutputPath = deployDir
Publish = false })
"NAudio.nuspec"
)
Target "Release" DoNothing
Target "ZipAll" DoNothing
// a bit hacky, but persuading CreateZipOfIncludes to create the directory structure we want
let demoIncludes =
!! "**"
-- "**/*.pdb"
-- "*.vshost.*"
-- "*nunit*"
let demoApps = ["AudioFileInspector"; "NAudioDemo"; "NAudioWpfDemo"]
let demoFiles =
demoApps
|> Seq.map (fun a -> a, Path.GetFullPath (sprintf "./%s/bin/Debug" a))
|> Seq.map (fun (a,b) -> a, { demoIncludes with BaseDirectory = b })
|> List.ofSeq
Target "ZipDemo" (fun _ ->
CreateZipOfIncludes (deployDir + "NAudio-Demos.zip") "" DefaultZipLevel demoFiles
)
Target "ZipSource" (fun _ ->
let errorCode = Shell.Exec( "git","archive --format zip --output " + deployDir + "NAudio-Source.zip master", ".")
()
)
// Create a zip release library
Target "ZipLib" (fun _ ->
let zipFiles = [@".\NAudio\bin\Release\NAudio.dll";
@".\NAudio\bin\Release\NAudio.xml";
"license.txt";
"readme.txt"
]
let flatten = true
let comment = ""
let workingDir = "."
CreateZip workingDir (deployDir + "NAudio-Release.zip") comment DefaultZipLevel flatten zipFiles
)
"Clean"
==> "DebugBuild"
==> "Test"
?=> "ReleaseBuild"
==> "Release"
"ZipDemo" ==> "ZipAll"
"ZipLib" ==> "ZipAll"
"ZipSource" ==> "ZipAll"
"ReleaseBuild" ==> "ZipLib"
RunTargetOrDefault "Test"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OpenSharperSync/NAudio.git
git@gitee.com:OpenSharperSync/NAudio.git
OpenSharperSync
NAudio
NAudio
master

搜索帮助