Skip to content

Commit

Permalink
Merge pull request #20 from opcon/develop
Browse files Browse the repository at this point in the history
Version 0.13
  • Loading branch information
opcon authored Sep 26, 2016
2 parents a73d7e5 + 6b69098 commit 59edde0
Show file tree
Hide file tree
Showing 29 changed files with 1,123 additions and 663 deletions.
50 changes: 39 additions & 11 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let substructioDir = parentDir + substructioFolder + "/"
let substructioBuildDir = substructioDir + buildDirBase + mode + "/"
let contentDirDeployName = "Content"
let licenseDirDeployName = "Licenses"
let dllDirDeployName = "Dependencies"

// MonoKickStart properties
let monoKickStartRepo = @"https://github.com/MonoGame/MonoKickstart"
Expand All @@ -47,6 +48,9 @@ let deployName =
let tempDirName = lazy
tempDirBase + deployName.Value + "/"

let tempDirZipName = lazy
tempDirBase + deployName.Value + "-zip/"

let tempMergedDirName = lazy
tempDirBase + deployName.Value + "-merged/"

Expand All @@ -60,7 +64,7 @@ let deployZipMergedPath = lazy
deployDir + deployZipMergedName.Value

// Tool names
let squirrelToolName = "squirrel.exe"
let squirrelToolName = "Squirrel.exe"
let ILMergeToolName = "ILRepack.exe"

// Targets
Expand Down Expand Up @@ -124,17 +128,27 @@ Target "CleanDeploy" (fun _ ->
CleanDir deployDir
)

Target "DeployZip" (fun _ ->
Target "CopyToTemp" (fun _ ->
ensureDirectory deployDir

let mainFiles = !! (sprintf "%s*.dll" buildDir) ++ (sprintf "%s*.config" buildDir) ++ (sprintf "%s*.exe" buildDir) -- (sprintf "%s*vshost*" buildDir)

CopyFiles tempDirName.Value mainFiles
CopyDir (tempDirName.Value + contentDirDeployName) "src/TurntNinja/Content/" (fun x -> true)
CopyDir (tempDirName.Value + licenseDirDeployName) "docs/licenses" (fun x-> true)
)

let dInfo = new System.IO.DirectoryInfo(tempDirName.Value)
Zip tempDirName.Value deployZipPath.Value [ for f in dInfo.EnumerateFiles("*", System.IO.SearchOption.AllDirectories) do yield f.FullName]
Target "DeployZip" (fun _ ->
CopyDir tempDirZipName.Value tempDirName.Value (fun x -> true)

let filesToMove = !! (sprintf "%s*.dll" tempDirZipName.Value) ++ (sprintf "%s*.dll.config" tempDirZipName.Value)

Copy (tempDirZipName.Value + dllDirDeployName) filesToMove

DeleteFiles filesToMove

let dInfo = new System.IO.DirectoryInfo(tempDirZipName.Value)
Zip tempDirZipName.Value deployZipPath.Value [ for f in dInfo.EnumerateFiles("*", System.IO.SearchOption.AllDirectories) do yield f.FullName]
//ArchiveHelper.Tar.GZip.CompressWithDefaults (directoryInfo artifactTempDir) (fileInfo (deployDir + deployName + ".tar.gz")) (dInfo.EnumerateFiles("*", System.IO.SearchOption.AllDirectories))
)

Expand All @@ -154,15 +168,16 @@ Target "DeploySquirrel" (fun _ ->
("**/*.*", Some @"lib/net45", None)
]
OutputPath = deployDir
WorkingDir = tempDirName.Value
WorkingDir = tempDirZipName.Value
})
"src\TurntNinja\TurntNinja.nuspec"
"src/TurntNinja/TurntNinja.nuspec"

let squirrelPath = findToolInSubPath squirrelToolName ""
// Create squirrel package
Squirrel.SquirrelPack (fun p ->
{p with
ReleaseDir = squirrelDeployDir
ToolPath = findToolInSubPath squirrelToolName ""
ToolPath = squirrelPath
})
packagePath
)
Expand Down Expand Up @@ -201,6 +216,7 @@ Target "DeployKickStart" (fun _ ->
)

Target "Deploy" (fun _ -> ())
Target "DeployAll" (fun _ -> ())

Target "PushArtifacts" (fun _ ->
match buildServer with
Expand Down Expand Up @@ -237,23 +253,35 @@ Target "Default" (fun _ ->
==> "CleanSubstructio"

"CleanTemp"
==> "CopyToTemp"

"CopyToTemp"
==> "DeployZip"

"DeployZip"
==> "PushArtifacts"

"DeployZip"
"CopyToTemp"
==> "DeployMerged"

"DeployZip"
==> "DeploySquirrel"

"DeploySquirrel"
"DeployZip"
==> "Deploy"

"DeployZip"
==> "DeployAll"

"DeployMerged"
==> "DeployAll"

"DeploySquirrel"
==> "DeployAll"

// Deploy zip conditional target to ensure that we are built
// CopyToTemp conditional target to ensure that we are built
"Build"
=?> ("DeployZip", not (fileExists appPath))
=?> ("CopyToTemp", not (fileExists appPath))

// start build
RunTargetOrDefault "Default"
2 changes: 1 addition & 1 deletion paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ nuget Microsoft.Data.Services.Client = 5.6.1
group Build

source https://www.nuget.org/api/v2/
nuget FAKE
nuget FAKE
18 changes: 9 additions & 9 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ NUGET
ColorMine (1.1.3) - framework: >= net45
DeltaCompressionDotNet (1.0) - framework: >= net45
HUSL (1.0.1) - framework: >= net45
LiteDB (2.0) - framework: >= net45
MathNet.Numerics (3.13) - framework: >= net45
LiteDB (2.0.2) - framework: >= net45
MathNet.Numerics (3.13.1) - framework: >= net45
Mono.Cecil (0.9.6.1) - framework: >= net45
Newtonsoft.Json (9.0.1)
NuGet.CommandLine (3.4.3)
SharpFont (4.0.1) - framework: >= net45
SharpFont.Dependencies
SharpRaven (2.1)
Newtonsoft.Json (>= 6.0.6)
Splat (1.6.2) - framework: >= net45
Expand All @@ -19,9 +21,9 @@ NUGET
Splat (>= 1.6.2)
TagLib.Portable (1.0.4) - framework: >= net45
remote: https://ci.appveyor.com/nuget/cscore-lt381sf5ht3e
CSCore (1.1.24)
CSCore.OSX (1.1.24)
CSCore (>= 1.1.24)
CSCore (1.1.29)
CSCore.OSX (1.1.29)
CSCore (>= 1.1.29)
remote: https://ci.appveyor.com/nuget/gwen-nolegacy-opentk-renderer-y8bf4l8s9nxo
Gwen (3.0.6026.7037) - framework: >= net45
OpenTK.Next (>= 1.1.1616.8959)
Expand All @@ -41,19 +43,17 @@ NUGET
OpenTK.Next (>= 1.1.1616.8959)
SharpFont (>= 3.1)
SharpFont.Dependencies (>= 2.6)
SharpFont (3.1.0) - framework: >= net45
SharpFont.Dependencies
SharpFont.Dependencies (2.6) - framework: >= net45

GROUP Build
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.38)
FAKE (4.39)

GROUP Deploy
NUGET
remote: https://www.nuget.org/api/v2
ILRepack (2.0.10)
ILRepack (2.0.11)
Microsoft.Data.Edm (5.6.1)
Microsoft.Data.OData (5.6.1)
Microsoft.Data.Edm (5.6.1)
Expand Down
Loading

0 comments on commit 59edde0

Please sign in to comment.