Exemplo n.º 1
0
        public static GitHubUpgrader Create(
            ITracer tracer,
            PhysicalFileSystem fileSystem,
            bool dryRun,
            bool noVerify,
            LocalScalarConfig localConfig,
            out string error)
        {
            GitHubUpgrader       upgrader             = null;
            GitHubUpgraderConfig gitHubUpgraderConfig = new GitHubUpgraderConfig(tracer, localConfig);

            if (!gitHubUpgraderConfig.TryLoad(out error))
            {
                return(null);
            }

            if (gitHubUpgraderConfig.ConfigError())
            {
                gitHubUpgraderConfig.ConfigAlertMessage(out error);
                return(null);
            }

            upgrader = new GitHubUpgrader(
                ProcessHelper.GetCurrentProcessVersion(),
                tracer,
                fileSystem,
                gitHubUpgraderConfig,
                dryRun,
                noVerify);

            return(upgrader);
        }
Exemplo n.º 2
0
 public static string CurrentScalarVersion()
 {
     return(ProcessHelper.GetCurrentProcessVersion());
 }
Exemplo n.º 3
0
        public static bool IsDevelopmentVersion()
        {
            Version currentVersion = new Version(ProcessHelper.GetCurrentProcessVersion());

            return(currentVersion.Major == 0);
        }