Skip to content

Commit 0ebb4ee

Browse files
committed
Use FAKE.BuildLib
1 parent 2a822ea commit 0ebb4ee

File tree

6 files changed

+50
-196
lines changed

6 files changed

+50
-196
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*.{cs, py, fsx}]
4+
indent_style = space
5+
indent_size = 4
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
9+
[*.{json, xml}]
10+
indent_style = space
11+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

Lines changed: 10 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
## Ignore Visual Studio temporary files, build results, and
2-
## files generated by popular Visual Studio add-ons.
3-
41
# User-specific files
52
*.suo
63
*.user
74
*.userosscache
85
*.sln.docstates
96

10-
# User-specific files (MonoDevelop/Xamarin Studio)
11-
*.userprefs
12-
137
# Build results
148
[Dd]ebug/
159
[Dd]ebugPublic/
@@ -22,122 +16,26 @@ bld/
2216
[Bb]in/
2317
[Oo]bj/
2418

19+
# Coverity output
20+
cov-int/
21+
2522
# Visual Studio 2015 cache/options directory
2623
.vs/
2724

28-
# MSTest test Results
29-
[Tt]est[Rr]esult*/
30-
[Bb]uild[Ll]og.*
31-
32-
# NUNIT
33-
*.VisualState.xml
34-
TestResult.xml
35-
36-
# Build Results of an ATL Project
37-
[Dd]ebugPS/
38-
[Rr]eleasePS/
39-
dlldata.c
40-
4125
# DNX
4226
project.lock.json
4327
artifacts/
4428

45-
*_i.c
46-
*_p.c
47-
*_i.h
48-
*.ilk
49-
*.obj
50-
*.pch
51-
*.pdb
52-
*.pgc
53-
*.pgd
54-
*.rsp
55-
*.sbr
56-
*.tlb
57-
*.tli
58-
*.tlh
59-
*.tmp
60-
*.tmp_proj
61-
*.log
62-
*.vspscc
63-
*.vssscc
64-
.builds
65-
*.pidb
66-
*.svclog
67-
*.scc
68-
69-
# Chutzpah Test files
70-
_Chutzpah*
71-
72-
# Visual C++ cache files
73-
ipch/
74-
*.aps
75-
*.ncb
76-
*.opensdf
77-
*.sdf
78-
*.cachefile
79-
8029
# Visual Studio profiler
8130
*.psess
8231
*.vsp
8332
*.vspx
8433

85-
# TFS 2012 Local Workspace
86-
$tf/
87-
88-
# Guidance Automation Toolkit
89-
*.gpState
90-
91-
# ReSharper is a .NET coding add-in
92-
_ReSharper*/
93-
*.[Rr]e[Ss]harper
94-
*.DotSettings.user
95-
96-
# JustCode is a .NET coding add-in
97-
.JustCode
98-
99-
# TeamCity is a build add-in
100-
_TeamCity*
101-
102-
# DotCover is a Code Coverage Tool
103-
*.dotCover
104-
105-
# NCrunch
106-
_NCrunch_*
107-
.*crunch*.local.xml
108-
109-
# MightyMoose
110-
*.mm.*
111-
AutoTest.Net/
112-
113-
# Web workbench (sass)
114-
.sass-cache/
115-
116-
# Installshield output folder
117-
[Ee]xpress/
118-
119-
# DocProject is a documentation generator add-in
120-
DocProject/buildhelp/
121-
DocProject/Help/*.HxT
122-
DocProject/Help/*.HxC
123-
DocProject/Help/*.hhc
124-
DocProject/Help/*.hhk
125-
DocProject/Help/*.hhp
126-
DocProject/Help/Html2
127-
DocProject/Help/html
34+
# Visual Studio Code
35+
.vscode
12836

12937
# Click-Once directory
130-
publish/
131-
132-
# Publish Web Output
133-
*.[Pp]ublish.xml
134-
*.azurePubxml
135-
## TODO: Comment the next line if you want to checkin your
136-
## web deploy settings but do note that will include unencrypted
137-
## passwords
138-
#*.pubxml
139-
140-
*.publishproj
38+
[Pp]ublish/
14139

14240
# NuGet Packages
14341
*.nupkg
@@ -161,52 +59,8 @@ AppPackages/
16159
# but keep track of directories ending in .cache
16260
!*.[Cc]ache/
16361

164-
# Others
165-
ClientBin/
166-
[Ss]tyle[Cc]op.*
167-
~$*
168-
*~
169-
*.dbmdl
170-
*.dbproj.schemaview
171-
*.pfx
172-
*.publishsettings
173-
node_modules/
174-
orleans.codegen.cs
175-
.fake
176-
177-
# RIA/Silverlight projects
178-
Generated_Code/
179-
180-
# Backup & report files from converting an old project file
181-
# to a newer Visual Studio version. Backup files are not needed,
182-
# because we have git ;-)
183-
_UpgradeReport_Files/
184-
Backup*/
185-
UpgradeLog*.XML
186-
UpgradeLog*.htm
187-
188-
# SQL Server files
189-
*.mdf
190-
*.ldf
191-
192-
# Business Intelligence projects
193-
*.rdl.data
194-
*.bim.layout
195-
*.bim_*.settings
196-
197-
# Microsoft Fakes
198-
FakesAssemblies/
199-
200-
# Node.js Tools for Visual Studio
201-
.ntvs_analysis.dat
202-
203-
# Visual Studio 6 build log
204-
*.plg
205-
206-
# Visual Studio 6 workspace options file
207-
*.opt
62+
# Fake
63+
.fake/
20864

209-
# LightSwitch generated files
210-
GeneratedArtifacts/
211-
_Pvt_Extensions/
212-
ModelManifest.xml
65+
# No APK
66+
*.apk

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Saladbowl Creative
3+
Copyright (c) 2016 SaladLab
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

build.cmd

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22

33
pushd %~dp0
44

5-
tools\nuget\NuGet.exe update -self
6-
tools\nuget\NuGet.exe install FAKE -ConfigFile tools\nuget\Nuget.Config -OutputDirectory packages -ExcludeVersion -Version 4.7.3
5+
SET PACKAGEPATH=.\packages\
6+
SET NUGET=.\tools\nuget\NuGet.exe
7+
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion
8+
9+
IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 (
10+
RD /S/Q %PACKAGEPATH%FAKE
11+
%NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS%
12+
COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0
13+
)
14+
15+
IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8 (
16+
RD /S/Q %PACKAGEPATH%FAKE.BuildLib
17+
%NUGET% install FAKE.BuildLib -Version 0.1.8 %NUGETOPTIONS%
18+
COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.8
19+
)
720

821
set encoding=utf-8
9-
packages\FAKE\tools\FAKE.exe build.fsx %*
22+
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*
1023

1124
popd

build.fsx

Lines changed: 11 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
11
#I @"packages/FAKE/tools"
2+
#I @"packages/FAKE.BuildLib/lib/net451"
23
#r "FakeLib.dll"
4+
#r "BuildLib.dll"
35

46
open Fake
5-
open Fake.FileHelper
6-
open System.IO
7+
open BuildLib
78

8-
// ---------------------------------------------------------------------------- Variables
9+
let solution = initSolution "" "" []
910

10-
let binDir = "bin"
11+
Target "Clean" <| fun _ -> cleanBin
1112

12-
// ------------------------------------------------------------------------- Unity Helper
13+
Target "Package" <| fun _ -> buildUnityPackage "./src/UnityPackage"
1314

14-
let UnityPath =
15-
@"C:\Program Files\Unity\Editor\Unity.exe"
15+
Target "Help" <| fun _ ->
16+
showUsage solution (fun name ->
17+
if name = "package" then Some("Build package", "")
18+
else None)
1619

17-
let Unity projectPath args =
18-
let result = Shell.Exec(UnityPath, "-quit -batchmode -logFile -projectPath \"" + projectPath + "\" " + args)
19-
if result < 0 then failwithf "Unity exited with error %d" result
20-
21-
// ------------------------------------------------------------------------------ Targets
22-
23-
Target "Clean" (fun _ ->
24-
CleanDirs [binDir]
25-
)
26-
27-
Target "Package" (fun _ ->
28-
Unity (Path.GetFullPath "src/UnityPackage") "-executeMethod PackageBuilder.BuildPackage"
29-
(!! "src/UnityPackage/*.unitypackage") |> Seq.iter (fun p -> MoveFile binDir p)
30-
)
31-
32-
Target "Help" (fun _ ->
33-
List.iter printfn [
34-
"usage:"
35-
"build [target]"
36-
""
37-
" Targets for building:"
38-
" * Package Build UnityPackage"
39-
""]
40-
)
41-
42-
// --------------------------------------------------------------------------- Dependency
43-
44-
// Build order
4520
"Clean"
4621
==> "Package"
4722

48-
RunTargetOrDefault "Package"
23+
RunTargetOrDefault "Help"

0 commit comments

Comments
 (0)