@@ -11,21 +11,21 @@ class Build : NukeBuild
11
11
{
12
12
[ Parameter ( "Configuration to build - Default is 'Debug' (local) or 'Release' (server)" ) ]
13
13
readonly Configuration Configuration = IsLocalBuild ? Configuration . Debug : Configuration . Release ;
14
-
14
+
15
15
[ Parameter ] readonly string Version = "1.0.0" ;
16
-
16
+
17
17
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser" ;
18
18
AbsolutePath OutputDirectory => RootDirectory / "output" ;
19
19
AbsolutePath WinOutputDirectory => OutputDirectory / "win" ;
20
20
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux" ;
21
-
21
+
22
22
AbsolutePath WinZip => OutputDirectory / $ "K8sFileBrowser_{ Version } .zip";
23
23
AbsolutePath LinuxGz => OutputDirectory / $ "K8sFileBrowser_{ Version } .tgz";
24
-
24
+
25
25
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj" ;
26
26
27
27
readonly string ExcludedExtensions = "pdb" ;
28
-
28
+
29
29
public static int Main ( ) => Execute < Build > ( x => x . Publish ) ;
30
30
31
31
@@ -37,14 +37,6 @@ class Build : NukeBuild
37
37
OutputDirectory . DeleteDirectory ( ) ;
38
38
} ) ;
39
39
40
- Target Restore => _ => _
41
- . Executes ( ( ) =>
42
- {
43
- DotNet ( $ "restore { ProjectFile } ") ;
44
- //DotNetTasks.DotNetRestore(new DotNetRestoreSettings());
45
- } ) ;
46
-
47
-
48
40
Target PublishWin => _ => _
49
41
. DependsOn ( Clean )
50
42
. Executes ( ( ) =>
@@ -62,18 +54,17 @@ class Build : NukeBuild
62
54
. SetCopyright ( "Copyright (c) 2023" )
63
55
. SetVersion ( Version )
64
56
. SetProcessArgumentConfigurator ( _ => _
65
- . Add ( "-p:IncludeNativeLibrariesForSelfExtract=true" ) )
66
- . EnableNoRestore ( ) ) ;
67
-
57
+ . Add ( "-p:IncludeNativeLibrariesForSelfExtract=true" ) ) ) ;
58
+
68
59
WinOutputDirectory . ZipTo (
69
60
WinZip ,
70
61
filter : x => ! x . HasExtension ( ExcludedExtensions ) ,
71
62
compressionLevel : CompressionLevel . SmallestSize ,
72
63
fileMode : FileMode . CreateNew ) ;
73
64
} ) ;
74
-
65
+
75
66
Target PublishLinux => _ => _
76
- . DependsOn ( Clean )
67
+ . DependsOn ( Clean )
77
68
. Executes ( ( ) =>
78
69
{
79
70
DotNetPublish ( s => s
@@ -89,19 +80,18 @@ class Build : NukeBuild
89
80
. SetCopyright ( "Copyright (c) 2023" )
90
81
. SetVersion ( Version )
91
82
. SetProcessArgumentConfigurator ( _ => _
92
- . Add ( "-p:IncludeNativeLibrariesForSelfExtract=true" ) )
93
- . EnableNoRestore ( ) ) ;
94
-
83
+ . Add ( "-p:IncludeNativeLibrariesForSelfExtract=true" ) ) ) ;
84
+
95
85
LinuxOutputDirectory . TarGZipTo (
96
86
LinuxGz ,
97
87
filter : x => ! x . HasExtension ( ExcludedExtensions ) ,
98
88
fileMode : FileMode . CreateNew ) ;
99
89
} ) ;
100
-
90
+
101
91
Target Publish => _ => _
102
92
. DependsOn ( PublishWin , PublishLinux )
103
93
. Executes ( ( ) =>
104
94
{
105
95
} ) ;
106
96
107
- }
97
+ }
0 commit comments