Example #1
0
            public GitInstallDetails(NPath baseDataPath, bool onWindows)
            {
                this.onWindows = onWindows;

                ZipPath = baseDataPath.Combine("downloads");
                ZipPath.EnsureDirectoryExists();
                GitZipPath    = ZipPath.Combine(gitZip);
                GitLfsZipPath = ZipPath.Combine(gitLfsZip);

                GitInstallationPath = baseDataPath.Combine(GitDirectory);
                GitExecutablePath   = GitInstallationPath.Combine(onWindows ? "cmd" : "bin", "git" + DefaultEnvironment.ExecutableExt);

                GitLfsInstallationPath = baseDataPath.Combine(GitLfsDirectory);
                GitLfsExecutablePath   = GitLfsInstallationPath.Combine("git-lfs" + DefaultEnvironment.ExecutableExt);

                if (onWindows)
                {
                    GitPackageFeed    = packageFeed + $"windows/{GitPackageName}";
                    GitLfsPackageFeed = packageFeed + $"windows/{GitLfsPackageName}";
                }
                else
                {
                    GitPackageFeed    = packageFeed + $"mac/{GitPackageName}";
                    GitLfsPackageFeed = packageFeed + $"mac/{GitLfsPackageName}";
                }
            }
Example #2
0
            public GitInstallDetails(NPath baseDataPath, bool onWindows)
            {
                this.onWindows = onWindows;

                ZipPath = baseDataPath.Combine("downloads");
                ZipPath.EnsureDirectoryExists();
                GitZipPath    = ZipPath.Combine(gitZip);
                GitLfsZipPath = ZipPath.Combine(gitLfsZip);

                var gitInstallPath = baseDataPath.Combine(PackageNameWithVersion);

                GitInstallationPath = gitInstallPath;

                if (onWindows)
                {
                    GitExecutable    += "git.exe";
                    GitLfsExecutable += "git-lfs.exe";

                    GitExecutablePath = gitInstallPath.Combine("cmd", GitExecutable);
                }
                else
                {
                    GitExecutable    = "git";
                    GitLfsExecutable = "git-lfs";

                    GitExecutablePath = gitInstallPath.Combine("bin", GitExecutable);
                }

                GitLfsExecutablePath = GetGitLfsExecutablePath(gitInstallPath);
            }