mirror of
https://github.com/frosch95/K8sFileBrowser.git
synced 2026-04-11 12:58:22 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a696152667 | |||
| 491127d460 |
@@ -133,11 +133,11 @@ public class MainWindowViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
// read the file information when the path changes
|
// read the file information when the path changes
|
||||||
this
|
this
|
||||||
.WhenAnyValue(c => c.SelectedContainer)
|
.WhenAnyValue(c => c.SelectedContainer, c => c.SelectedPath)
|
||||||
.Throttle(new TimeSpan(10))
|
.Throttle(new TimeSpan(10))
|
||||||
.Select(x => x == null
|
.Select(x => x.Item1 == null || x.Item2 == null
|
||||||
? new List<FileInformation>()
|
? new List<FileInformation>()
|
||||||
: GetFileInformation(kubernetesService, SelectedPath!, SelectedPod!, SelectedNamespace!, x))
|
: GetFileInformation(kubernetesService, x.Item2, SelectedPod!, SelectedNamespace!, x.Item1))
|
||||||
.ObserveOn(RxApp.MainThreadScheduler)
|
.ObserveOn(RxApp.MainThreadScheduler)
|
||||||
.Subscribe(x => FileInformation = x);
|
.Subscribe(x => FileInformation = x);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,40 +11,31 @@ class Build : NukeBuild
|
|||||||
{
|
{
|
||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
||||||
|
|
||||||
[Parameter] readonly string Version = "1.0.0";
|
[Parameter] readonly string Version = "1.0.0";
|
||||||
|
|
||||||
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
|
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
|
||||||
AbsolutePath OutputDirectory => RootDirectory / "output";
|
AbsolutePath OutputDirectory => RootDirectory / "output";
|
||||||
AbsolutePath WinOutputDirectory => OutputDirectory / "win";
|
AbsolutePath WinOutputDirectory => OutputDirectory / "win";
|
||||||
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux";
|
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux";
|
||||||
|
|
||||||
AbsolutePath WinZip => OutputDirectory / $"K8sFileBrowser_{Version}.zip";
|
AbsolutePath WinZip => OutputDirectory / $"K8sFileBrowser_{Version}.zip";
|
||||||
AbsolutePath LinuxGz => OutputDirectory / $"K8sFileBrowser_{Version}.tgz";
|
AbsolutePath LinuxGz => OutputDirectory / $"K8sFileBrowser_{Version}.tgz";
|
||||||
|
|
||||||
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
|
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
|
||||||
|
|
||||||
readonly string ExcludedExtensions = "pdb";
|
readonly string ExcludedExtensions = "pdb";
|
||||||
|
|
||||||
public static int Main () => Execute<Build>(x => x.Publish);
|
public static int Main () => Execute<Build>(x => x.Publish);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Target Clean => _ => _
|
Target Clean => _ => _
|
||||||
.Before(Restore)
|
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
OutputDirectory.DeleteDirectory();
|
OutputDirectory.DeleteDirectory();
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Restore => _ => _
|
|
||||||
.Executes(() =>
|
|
||||||
{
|
|
||||||
DotNet($"restore {ProjectFile}");
|
|
||||||
//DotNetTasks.DotNetRestore(new DotNetRestoreSettings());
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
Target PublishWin => _ => _
|
Target PublishWin => _ => _
|
||||||
.DependsOn(Clean)
|
.DependsOn(Clean)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
@@ -62,18 +53,17 @@ class Build : NukeBuild
|
|||||||
.SetCopyright("Copyright (c) 2023")
|
.SetCopyright("Copyright (c) 2023")
|
||||||
.SetVersion(Version)
|
.SetVersion(Version)
|
||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessArgumentConfigurator(_ => _
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
|
||||||
.EnableNoRestore());
|
|
||||||
|
|
||||||
WinOutputDirectory.ZipTo(
|
WinOutputDirectory.ZipTo(
|
||||||
WinZip,
|
WinZip,
|
||||||
filter: x => !x.HasExtension(ExcludedExtensions),
|
filter: x => !x.HasExtension(ExcludedExtensions),
|
||||||
compressionLevel: CompressionLevel.SmallestSize,
|
compressionLevel: CompressionLevel.SmallestSize,
|
||||||
fileMode: FileMode.CreateNew);
|
fileMode: FileMode.CreateNew);
|
||||||
});
|
});
|
||||||
|
|
||||||
Target PublishLinux => _ => _
|
Target PublishLinux => _ => _
|
||||||
.DependsOn(Clean)
|
.DependsOn(Clean)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
DotNetPublish(s => s
|
DotNetPublish(s => s
|
||||||
@@ -89,19 +79,18 @@ class Build : NukeBuild
|
|||||||
.SetCopyright("Copyright (c) 2023")
|
.SetCopyright("Copyright (c) 2023")
|
||||||
.SetVersion(Version)
|
.SetVersion(Version)
|
||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessArgumentConfigurator(_ => _
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")));
|
||||||
.EnableNoRestore());
|
|
||||||
|
|
||||||
LinuxOutputDirectory.TarGZipTo(
|
LinuxOutputDirectory.TarGZipTo(
|
||||||
LinuxGz,
|
LinuxGz,
|
||||||
filter: x => !x.HasExtension(ExcludedExtensions),
|
filter: x => !x.HasExtension(ExcludedExtensions),
|
||||||
fileMode: FileMode.CreateNew);
|
fileMode: FileMode.CreateNew);
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Publish => _ => _
|
Target Publish => _ => _
|
||||||
.DependsOn(PublishWin, PublishLinux)
|
.DependsOn(PublishWin, PublishLinux)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user