mirror of
https://github.com/frosch95/K8sFileBrowser.git
synced 2026-04-11 12:58:22 +02:00
compressed executable files
This commit is contained in:
@@ -161,7 +161,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate DataType="models:FileInformation">
|
<DataTemplate DataType="models:FileInformation">
|
||||||
<Border Background="Transparent">
|
<Border Background="Transparent">
|
||||||
<TextBlock Text="{Binding Size}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 8 0"/>
|
<TextBlock Text="{Binding Size}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0"/>
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
<EventTriggerBehavior EventName="DoubleTapped">
|
<EventTriggerBehavior EventName="DoubleTapped">
|
||||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate DataType="models:FileInformation">
|
<DataTemplate DataType="models:FileInformation">
|
||||||
<Border Background="Transparent">
|
<Border Background="Transparent">
|
||||||
<TextBlock Text="{Binding DateTimeOffsetString}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 8 0"/>
|
<TextBlock Text="{Binding DateTimeOffsetString}" VerticalAlignment="Center" Margin="10 0 8 0"/>
|
||||||
<Interaction.Behaviors>
|
<Interaction.Behaviors>
|
||||||
<EventTriggerBehavior EventName="DoubleTapped">
|
<EventTriggerBehavior EventName="DoubleTapped">
|
||||||
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window}}" />
|
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window}}" />
|
||||||
|
|||||||
@@ -1,32 +1,40 @@
|
|||||||
|
|
||||||
|
using System.IO;
|
||||||
|
using System.IO.Compression;
|
||||||
using Nuke.Common;
|
using Nuke.Common;
|
||||||
using Nuke.Common.IO;
|
using Nuke.Common.IO;
|
||||||
using Nuke.Common.ProjectModel;
|
|
||||||
using Nuke.Common.Tooling;
|
using Nuke.Common.Tooling;
|
||||||
using Nuke.Common.Tools.DotNet;
|
using Nuke.Common.Tools.DotNet;
|
||||||
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
using static Nuke.Common.Tools.DotNet.DotNetTasks;
|
||||||
|
|
||||||
class Build : NukeBuild
|
class Build : NukeBuild
|
||||||
{
|
{
|
||||||
|
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
||||||
|
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
||||||
|
|
||||||
|
[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 LinuxGz => OutputDirectory / $"K8sFileBrowser_{Version}.tgz";
|
||||||
|
|
||||||
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
|
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
|
||||||
|
|
||||||
|
readonly string ExcludedExtensions = "pdb";
|
||||||
|
|
||||||
public static int Main () => Execute<Build>(x => x.Publish);
|
public static int Main () => Execute<Build>(x => x.Publish);
|
||||||
|
|
||||||
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
|
|
||||||
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
|
|
||||||
|
|
||||||
[Parameter] readonly string Version = "1.0.0";
|
|
||||||
|
|
||||||
Target Clean => _ => _
|
Target Clean => _ => _
|
||||||
.Before(Restore)
|
.Before(Restore)
|
||||||
.Executes(() =>
|
.Executes(() =>
|
||||||
{
|
{
|
||||||
DotNetClean(s => s
|
OutputDirectory.DeleteDirectory();
|
||||||
.SetOutput(OutputDirectory));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Restore => _ => _
|
Target Restore => _ => _
|
||||||
@@ -56,6 +64,12 @@ class Build : NukeBuild
|
|||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessArgumentConfigurator(_ => _
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
||||||
.EnableNoRestore());
|
.EnableNoRestore());
|
||||||
|
|
||||||
|
WinOutputDirectory.ZipTo(
|
||||||
|
WinZip,
|
||||||
|
filter: x => !x.HasExtension(ExcludedExtensions),
|
||||||
|
compressionLevel: CompressionLevel.SmallestSize,
|
||||||
|
fileMode: FileMode.CreateNew);
|
||||||
});
|
});
|
||||||
|
|
||||||
Target PublishLinux => _ => _
|
Target PublishLinux => _ => _
|
||||||
@@ -77,6 +91,11 @@ class Build : NukeBuild
|
|||||||
.SetProcessArgumentConfigurator(_ => _
|
.SetProcessArgumentConfigurator(_ => _
|
||||||
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
.Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
|
||||||
.EnableNoRestore());
|
.EnableNoRestore());
|
||||||
|
|
||||||
|
LinuxOutputDirectory.TarGZipTo(
|
||||||
|
LinuxGz,
|
||||||
|
filter: x => !x.HasExtension(ExcludedExtensions),
|
||||||
|
fileMode: FileMode.CreateNew);
|
||||||
});
|
});
|
||||||
|
|
||||||
Target Publish => _ => _
|
Target Publish => _ => _
|
||||||
|
|||||||
Reference in New Issue
Block a user