Exemplo n.º 1
0
        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;
            }

            // If I want a list of up to date onions run it with '--getonions'.
            if (argsProcessor.IsGetOnionsMode())
            {
                var api = new BitnodesApi(Console.Out);
                await api.PrintOnionsAsync();

                return;
            }

            // If I want a list of up to date onions run it with '--reduceonions'.
            if (argsProcessor.IsReduceOnionsMode())
            {
                string onionFilePath = Path.Combine(LibraryProjectDirectory, "Tor", "OnionSeeds", "MainOnionSeeds.txt");
                var    currentOnions = File.ReadAllLines(onionFilePath).ToHashSet();

                var api = new BitnodesApi(Console.Out);
                await api.PrintOnionsAsync(currentOnions);

                return;
            }

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

            IsContinuousDelivery = argsProcessor.IsContinuousDeliveryMode();

            ReportStatus();

            if (DoPublish || OnlyBinaries)
            {
                Publish();

                IoHelpers.OpenFolderInFileExplorer(BinDistDirectory);
            }

            if (!OnlyBinaries)
            {
                if (DoSign)
                {
                    Sign();
                }

                if (DoRestoreProgramCs)
                {
                    RestoreProgramCs();
                }
            }
        }
Exemplo n.º 2
0
        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)
            {
                Publish();

                IoHelpers.OpenFolderInFileExplorer(BinDistDirectory);
            }

            if (!OnlyBinaries)
            {
                if (DoSign)
                {
                    Sign();
                }

                if (DoRestoreProgramCs)
                {
                    RestoreProgramCs();
                }
            }
        }