Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepowershell
titleExample how to commit and push changes to a remote repository
linenumberstrue
Import-Module JS7
Connect-JS7 -Url http://root:root@test_host:4446 -Id 'Controller' | Out-Null

# Add changes to the remote Git repository
Invoke-JS7GitRepositoryAdd -Folder '/Accounting' | Out-Null

# Commit changes
$reponse$response = Invoke-JS7GitRepositoryCommit -Folder '/Accounting' -Message 'changes for release v1.13'
# Parse commit hash from response
if ( $matchInfo = ( $response.stdout | Select-String '^\[.* +([0-9a-z]+)\]' ) )
{
	$commitHash = $matchInfo.Matches.Groups[1].Value
}

# Push changes
Invoke-JS7GitRepositoryPush -Folder '/Accounting' | Out-Null

...