gitlab_ci_runner.runner.Build.fetchCmd C# (CSharp) Method

fetchCmd() private method

Get the Fetch CMD
private fetchCmd ( ) : string
return string
        private string fetchCmd()
        {
            String sCmd = "";

            // Change to drive
            sCmd = sProjectDir.Substring(0, 1) + ":";
            // Change to directory
            sCmd += " && cd " + sProjectDir;

            Config.PrebuildConfig cfg = Config.getDataForBuild(buildInfo);
            if (cfg.ExistingRepoInit == "")
            {
                // Git Reset
                sCmd += " && git reset --hard";
                // Git Clean
                sCmd += " && git clean -f";
                // Git fetch
                sCmd += " && git fetch";
                // Git Checkout
                sCmd += " && git checkout " + buildInfo.sha;
            }
            else
            {
                sCmd += " && " + cfg.ExistingRepoInit;
            }

            return sCmd;
        }