// ---------------- Functions ----------------

        public override void Run(MeditationLogContext context)
        {
            var args = context.CreateFromArguments <VersionDumpArguments>();

            context.Information($"Writing version '{MedituConstants.VersionString}' to file '{args.OutputFile}'.");

            File.WriteAllText(
                args.OutputFile.ToString(),
                MedituConstants.VersionString
                );
        }
        public void Build(string target, ElectronBuilderArguments userArgs)
        {
            FilePath      projectPath      = this.context.GuiCsProject;
            DirectoryPath workingDirectory = projectPath.GetDirectory();
            DirectoryPath outputDirectory  = this.context.DesktopDistributionPath.Combine(target);

            var arguments = ProcessArgumentBuilder.FromStrings(
                new string[]
            {
                "build",
                $"/target {target}",
                // $"/absolute-path \"{outputDirectory}\"", // <- Doesn't work.  Need to use the manifest file to specify this.
                $"/electron-params --publish=never",     // <- Never publish, otherwise Jenkins tries to talk to GitHub.
                $"/version {MedituConstants.VersionString}",
                $"/p:Version={MedituConstants.VersionString}",
                $"/p:AssemblyVersion={MedituConstants.VersionString}",
                $"/p:FileVersion={MedituConstants.VersionString}"
            }
                );

            var processSettings = new ProcessSettings
            {
                Arguments        = arguments,
                WorkingDirectory = workingDirectory
            };

            this.context.EnsureDirectoryExists(outputDirectory);
            this.context.CleanDirectory(outputDirectory);

            FilePath electronizeExe = userArgs.ElectronizePath ?? new FilePath("electronize");

            context.Information($"Building desktop application for {target}");
            CreateManifestFile(projectPath, outputDirectory, workingDirectory);

            using (IProcess proc = this.context.ProcessRunner.Start(electronizeExe, processSettings))
            {
                proc.WaitForExit();
                if (proc.GetExitCode() != 0)
                {
                    throw new Exception("electronize exited with exit code: " + proc.GetExitCode());
                }
            }
        }