private void PreCommand() { EnvHelper.GetGitConfig(); EnvHelper.GetBranchName(); EnvHelper.GetStash(); FileHelper.SaveAllFiles(_dte); }
public void SolutionEvents_Opened() { EnvHelper.GetTortoiseGitProc(); EnvHelper.GetGit(); EnvHelper.GetSolutionDir(_dte); EnvHelper.GetGitConfig(); EnvHelper.GetBranchName(); EnvHelper.GetStash(); }
private void InitCommand(object sender, EventArgs e) { if (string.IsNullOrEmpty(EnvHelper.SolutionDir)) { return; } var flowDialog = new FlowDialog(); if (flowDialog.ShowDialog() != DialogResult.OK) { return; } var versionTag = string.IsNullOrEmpty(flowDialog.GitConfig.TagPrefix) ? "\"\"" : flowDialog.GitConfig.TagPrefix; /* 1. Add GitFlow config options * 2. Checkout develop branch (create if it doesn't exist, reset if it does) * 3. Push develop branch */ var process = ProcessHelper.StartProcessGui( "cmd.exe", $"/c cd \"{EnvHelper.SolutionDir}\" && " + GitHelper.GetSshSetup() + FormatCliCommand($"config --add gitflow.branch.master {flowDialog.GitConfig.MasterBranch}") + FormatCliCommand($"config --add gitflow.branch.develop {flowDialog.GitConfig.DevelopBranch}") + FormatCliCommand($"config --add gitflow.prefix.feature {flowDialog.GitConfig.FeaturePrefix}") + FormatCliCommand($"config --add gitflow.prefix.release {flowDialog.GitConfig.ReleasePrefix}") + FormatCliCommand($"config --add gitflow.prefix.hotfix {flowDialog.GitConfig.HotfixPrefix}") + FormatCliCommand($"config --add gitflow.prefix.versiontag {versionTag}") + (GitHelper.RemoteBranchExists(flowDialog.GitConfig.DevelopBranch) ? "echo." : FormatCliCommand($"checkout -b {flowDialog.GitConfig.DevelopBranch}", false)), "Initializing GitFlow" ); process.WaitForExit(); EnvHelper.GetGitConfig(); EnvHelper.GetBranchName(); }