2025-02-25 15:07:17 +01:00
|
|
|
// Copyright (C) 2025, The Duplicati Team
|
|
|
|
|
// https://duplicati.com, hello@duplicati.com
|
|
|
|
|
//
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
// copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
// to deal in the Software without restriction, including without limitation
|
|
|
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
|
|
|
//
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
|
//
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
2025-01-07 09:40:39 +01:00
|
|
|
|
2024-03-20 16:17:17 +01:00
|
|
|
using System.CommandLine;
|
|
|
|
|
|
|
|
|
|
namespace ReleaseBuilder;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Entry point for the executable
|
|
|
|
|
/// </summary>
|
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The supported build packages
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static readonly IReadOnlyList<PackageTarget> SupportedPackageTargets = new[] {
|
2024-03-22 12:15:53 +01:00
|
|
|
"win-x64-gui.zip",
|
|
|
|
|
"win-x64-gui.msi",
|
|
|
|
|
"win-x86-gui.zip",
|
|
|
|
|
"win-x86-gui.msi",
|
|
|
|
|
"win-arm64-gui.zip",
|
2024-05-25 23:36:24 +02:00
|
|
|
"win-arm64-gui.msi",
|
2024-11-07 23:05:55 +01:00
|
|
|
"win-x64-agent.msi", // Missing window service support
|
|
|
|
|
"win-arm64-agent.msi", // Missing window service support
|
2024-09-18 15:29:52 +02:00
|
|
|
"win-x64-agent.zip",
|
|
|
|
|
"win-arm64-agent.zip",
|
|
|
|
|
|
2024-03-22 12:15:53 +01:00
|
|
|
"linux-x64-gui.zip",
|
|
|
|
|
"linux-x64-gui.deb",
|
|
|
|
|
"linux-x64-gui.rpm",
|
2024-03-22 14:24:16 +01:00
|
|
|
"linux-x64-cli.zip",
|
|
|
|
|
"linux-x64-cli.deb",
|
|
|
|
|
"linux-x64-cli.rpm",
|
2024-03-22 12:15:53 +01:00
|
|
|
"linux-x64-cli.docker",
|
2024-04-09 15:23:18 +02:00
|
|
|
// "linux-x64-cli.spk", // Need to add new integration with DSM WebUI
|
2024-09-18 15:29:52 +02:00
|
|
|
"linux-x64-agent.zip",
|
|
|
|
|
"linux-x64-agent.deb",
|
|
|
|
|
"linux-x64-agent.rpm",
|
|
|
|
|
"linux-x64-agent.docker",
|
|
|
|
|
|
|
|
|
|
"linux-arm7-gui.zip",
|
|
|
|
|
"linux-arm7-gui.deb",
|
|
|
|
|
"linux-arm7-cli.zip",
|
|
|
|
|
"linux-arm7-cli.deb",
|
|
|
|
|
"linux-arm7-cli.docker",
|
|
|
|
|
|
2024-03-22 12:15:53 +01:00
|
|
|
"linux-arm64-gui.zip",
|
|
|
|
|
"linux-arm64-gui.deb",
|
|
|
|
|
"linux-arm64-gui.rpm",
|
2024-03-22 14:24:16 +01:00
|
|
|
"linux-arm64-cli.zip",
|
|
|
|
|
"linux-arm64-cli.deb",
|
|
|
|
|
"linux-arm64-cli.rpm",
|
2024-09-18 15:29:52 +02:00
|
|
|
"linux-arm64-cli.docker",
|
2024-04-09 15:23:18 +02:00
|
|
|
// "linux-arm64-cli.spk", // Need to add new integration with DSM WebUI
|
2024-09-18 15:29:52 +02:00
|
|
|
"linux-arm64-agent.zip",
|
|
|
|
|
"linux-arm64-agent.deb",
|
|
|
|
|
"linux-arm64-agent.rpm",
|
|
|
|
|
"linux-arm64-agent.docker",
|
|
|
|
|
|
2024-03-22 12:15:53 +01:00
|
|
|
"osx-x64-gui.dmg",
|
|
|
|
|
"osx-x64-gui.pkg",
|
2024-11-08 16:14:44 +01:00
|
|
|
"osx-x64-agent.pkg",
|
2024-11-08 23:28:42 +01:00
|
|
|
"osx-x64-cli.pkg",
|
2024-03-22 12:15:53 +01:00
|
|
|
"osx-arm64-gui.dmg",
|
|
|
|
|
"osx-arm64-gui.pkg",
|
2024-11-08 16:14:44 +01:00
|
|
|
"osx-arm64-agent.pkg",
|
2024-11-08 23:28:42 +01:00
|
|
|
"osx-arm64-cli.pkg",
|
2024-03-20 16:17:17 +01:00
|
|
|
}
|
|
|
|
|
.Select(x => PackageTarget.ParsePackageId(x))
|
|
|
|
|
.Distinct()
|
|
|
|
|
.ToList();
|
|
|
|
|
|
2024-03-27 19:52:40 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// The return code of the application; shared state
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static int? ReturnCode = 0;
|
|
|
|
|
|
2024-03-20 16:17:17 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Invokes the builder
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="args"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-03-27 19:52:40 +01:00
|
|
|
static async Task<int> Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
var r = await new RootCommand("Build tool for Duplicati")
|
2024-03-20 16:17:17 +01:00
|
|
|
{
|
2024-03-27 19:52:40 +01:00
|
|
|
Build.Command.Create(),
|
|
|
|
|
CreateKey.Command.Create(),
|
2024-03-20 16:17:17 +01:00
|
|
|
}.InvokeAsync(args);
|
2024-03-27 19:52:40 +01:00
|
|
|
|
|
|
|
|
return ReturnCode ?? r;
|
|
|
|
|
}
|
2024-03-20 16:17:17 +01:00
|
|
|
}
|