Class GitHelper
- Namespace
- SunamoDevCode
- Assembly
- SunamoDevCode.dll
Must be in Win because use powershell In shared cannot because win derife from shared. If I have abstract layer for shared, then yes
public class GitHelper
- Inheritance
-
GitHelper
- Inherited Members
- Extension Methods
Methods
NameOfRepoFromOriginUri(string)
Extracts repository name from git origin URI
public static string NameOfRepoFromOriginUri(string originUri)
Parameters
originUristringGit origin URI to parse
Returns
- string
Repository name extracted from the URI
PowershellForPull(List<string>)
Generates a PowerShell/Git bash script to pull updates from all specified folders.
public static string PowershellForPull(List<string> folders)
Parameters
Returns
- string
Generated bash script content for pulling all repositories.
PushSolution(bool, GitBashBuilder, string, string, string, PushSolutionsData, GitBashBuilder, Func<List<string>, Task<List<List<string>>>>)
Pushes changes for a solution to the remote repository, including status check and commit.
public static Task<bool> PushSolution(bool release, GitBashBuilder gitBashBuilder, string pushArgs, string commitMessage, string fullPathFolder, PushSolutionsData pushSolutionsData, GitBashBuilder gitStatus, Func<List<string>, Task<List<List<string>>>> psInvoke)
Parameters
releaseboolWhether this is a release build push.
gitBashBuilderGitBashBuilderGit bash builder for generating git commands.
pushArgsstringAdditional arguments for the push command.
commitMessagestringCommit message to use.
fullPathFolderstringFull path to the solution folder.
pushSolutionsDataPushSolutionsDataData about the push operation status.
gitStatusGitBashBuilderGit bash builder for status commands.
psInvokeFunc<List<string>, Task<List<List<string>>>>Function to invoke PowerShell commands and return their output.