File tree 3 files changed +23
-5
lines changed
3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ _ReSharper*/
30
30
packages /
31
31
* .userprefs
32
32
* .nupkg
33
- .fake /
33
+ .fake /
34
+ dist /
Original file line number Diff line number Diff line change 1
1
#r @" packages/FAKE.4.21.0/tools/NuGet.Core.dll"
2
2
#r @" packages/FAKE.4.21.0/tools/FakeLib.dll"
3
3
4
+ open System.IO
5
+ open System.Linq
4
6
open Fake
5
7
6
8
let exec command args =
@@ -9,15 +11,30 @@ let exec command args =
9
11
if result <> 0 then failwithf " %s exited with error %d " command result
10
12
11
13
Target " restore" ( fun () ->
12
- exec " tools/NuGet .exe" " restore QuickLayout.sln"
14
+ exec " tools/nuget .exe" " restore QuickLayout.sln"
13
15
)
14
16
15
17
Target " build" ( fun () ->
16
- MSBuild null " Build" [ " Configuration" , " Debug " ] [ " QuickLayout.sln" ]
18
+ MSBuild null " Build" [ " Configuration" , " Release " ] [ " QuickLayout.sln" ]
17
19
|> ignore
18
20
)
19
21
20
- " restore"
21
- ==> " build"
22
+ Target " nuget-package" ( fun () ->
23
+ if Directory.Exists( " dist" ) then Directory.Delete( " dist" , true )
24
+ Directory.CreateDirectory( " dist" ) |> ignore
25
+
26
+ exec " tools/nuget.exe" " pack nuspec/Cirrious.FluentLayout.nuspec -NoDefaultExcludes -OutputDirectory dist"
27
+ )
28
+
29
+ Target " nuget-push" ( fun () ->
30
+ let nupkgPath = Directory.EnumerateFiles( " dist" , " *.nupkg" ) .First()
31
+
32
+ exec " tools/nuget.exe" ( " push " + nupkgPath)
33
+ )
34
+
35
+ " restore"
36
+ ==> " build"
37
+ ==> " nuget-package"
38
+ ==> " nuget-push"
22
39
23
40
RunTarget()
You can’t perform that action at this time.
0 commit comments