Skip to content

Instantly share code, notes, and snippets.

@isaacrlevin
Created July 30, 2019 17:11
Show Gist options
  • Save isaacrlevin/f54b76232bd22dd8f09e83fe92fb59e4 to your computer and use it in GitHub Desktop.
Save isaacrlevin/f54b76232bd22dd8f09e83fe92fb59e4 to your computer and use it in GitHub Desktop.
Running CMD with Azure Function
System.Diagnostics.Process process = new System.Diagnostics.Process();
string WorkingDirectoryInfo = @"D:\home\site\wwwroot\";
string ExeLocation = @"D:\home\site\wwwroot\gitWork.cmd";
Process proc = new Process();
ProcessStartInfo info = new ProcessStartInfo();
try
{
info.WorkingDirectory = WorkingDirectoryInfo;
info.FileName = ExeLocation;
info.Arguments = "";
info.WindowStyle = ProcessWindowStyle.Minimized;
info.UseShellExecute = false;
info.CreateNoWindow = true;
proc.StartInfo = info;
proc.Refresh();
proc.Start();
proc.WaitForInputIdle();
proc.WaitForExit();
}
catch { }
git config --global user.name 'Name'
git config --global user.email 'Email'
git clone url
cd folder
git add .
git commit -m 'updates'
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment