Esempio n. 1
0
    /// <summary>
    /// Main entry point.
    /// </summary>
    private static async Task Main(string[] args)
    {
        var argsProcessor = new ArgsProcessor(args);

        // For now this is enough. If you run it on macOS you want to sign.
        if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
        {
            MacSignTools.Sign(argsProcessor);
            return;
        }

        // Only binaries mode is for deterministic builds.
        OnlyBinaries = argsProcessor.IsOnlyBinariesMode();

        IsContinuousDelivery = argsProcessor.IsContinuousDeliveryMode();

        ReportStatus();

        if (argsProcessor.IsPublish() || IsContinuousDelivery || OnlyBinaries)
        {
            await PublishAsync().ConfigureAwait(false);

            IoHelpers.OpenFolderInFileExplorer(BinDistDirectory);
        }

        if (argsProcessor.IsSign())
        {
            await SignAsync().ConfigureAwait(false);
        }
    }
Esempio n. 2
0
    /// <summary>
    /// Main entry point.
    /// </summary>
    private static async Task Main(string[] args)
    {
        var argsProcessor = new ArgsProcessor(args);

        // For now this is enough. If you run it on macOS you want to sign.
        if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
        {
            MacSignTools.Sign();
            return;
        }

        // Only binaries mode is for deterministic builds.
        OnlyBinaries = argsProcessor.IsOnlyBinariesMode();

        IsContinuousDelivery = argsProcessor.IsContinuousDeliveryMode();

        ReportStatus();

        if (DoPublish || OnlyBinaries)
        {
            await PublishAsync().ConfigureAwait(false);

            IoHelpers.OpenFolderInFileExplorer(BinDistDirectory);
        }

#pragma warning disable CS0162 // Unreachable code detected
        if (!OnlyBinaries)
        {
            if (DoSign)
            {
                await SignAsync().ConfigureAwait(false);
            }

            if (DoRestoreProgramCs)
            {
                RestoreProgramCs();
            }
        }
#pragma warning restore CS0162 // Unreachable code detected
    }
Esempio n. 3
0
        public void IsOnlyBinariesModeTest(string[] input, bool expectedResult)
        {
            var argsProcessor = new ArgsProcessor(input);

            Assert.Equal(expectedResult, argsProcessor.IsOnlyBinariesMode());
        }