ScriptDriverGitImpl¶
- class ScriptDriverGitImpl.ScriptDriverGitImpl¶
Bases:
object
- clone(stProjectLocation: str, stProjectName: str, sSourceUrl: str, gitProjectStoragePath: str, update_flags: VersionUpdateFlags = VersionUpdateFlags.NoUpdates) ScriptProject ¶
- clone(stProjectLocation: str, stProjectName: str, sSourceUrl: str, gitProjectStoragePath: str, username: str, password: str, update_flags: VersionUpdateFlags = VersionUpdateFlags.NoUpdates) ScriptProject
- clone(stProjectLocation: str, stProjectName: str, sSourceUrl: str, gitProjectStoragePath: str, username: str, password: SecureString, update_flags: VersionUpdateFlags = VersionUpdateFlags.NoUpdates) ScriptProject
- Clone a git repository into a new CODESYS Projectgit-clone - Clone a repository into a new directory
Warning
For passwords use of the SecureString overload is advised for security reasons.
- Parameters:
stProjectLocation (str) – Directory of the project files
stProjectName (str) – Name of the project
sSourceUrl (str) – Source URL of the repository
gitProjectStoragePath (str) – Directory of the local repository
update_flags (VersionUpdateFlags) – Flags for handeling project updates
username (str) – Username
password (Union[str,SecureString]) – Password
- recover_project(stProjectLocation: str, stProjectName: str, gitProjectStoragePath: str, update_flags: VersionUpdateFlags = VersionUpdateFlags.NoUpdates) ScriptProject ¶
- Recover a CODESYS Project from a local git repository.
- Parameters:
stProjectLocation (str) – Directory of the project files
stProjectName (str) – Name of the project
gitProjectStoragePath (str) – Directory of the local git repository
update_flags (VersionUpdateFlags) – Flags for handeling project updates
- get_merge_options() ScriptGitMergeOptions ¶
- Gets Git merge options.
- get_pull_options() ScriptGitPullOptions ¶
- Gets Git pull options.
- set_git_repository_extraction_path(extraction_path: str)¶
- Provides the possibility to set the extraction path of the git repository contained in a project archive.This path is used for the next project archive extraction, regardless, if its triggered via scripting, UI or command.This path is reseted after the next project archive extraction.The path has to be valid and has to point to an empty or non-existing dirctory.
- Parameters:
extraction_path (str) – The path where the git repository from the archive should be extracted to
- initialize_git_user_config(user: str, email: str)¶
- Writes the .gitconfig file for the current user with the default settingsrequired by CODESYS Git.If the user config file does not exist, it will be created.If the user config file already exists, existing entries will be overwritten.This will implicitly set the following two settings:core.longpaths = trueinit.defaultBranch = master
- Parameters:
user (str) – The username used for commits
email (str) – The email address used for commits