Sven Ullmann
2 years ago
5 changed files with 71 additions and 25 deletions
-
9plugins/git/etc/config.json
-
24plugins/git/src/commands/clone
-
26plugins/git/src/commands/configure-ssh
-
26plugins/git/src/commands/configure-url
-
11plugins/ssh/src/includes/ssh
@ -1,12 +1,5 @@ |
|||
{ |
|||
"git": { |
|||
"url": null, |
|||
"ssh": { |
|||
"user": null, |
|||
"domain": null, |
|||
"private_key": null, |
|||
"public_key": null, |
|||
"private_key_passphrase": null |
|||
} |
|||
"repositories": {} |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
#!/bin/bash |
|||
|
|||
### DO NOT EDIT THIS FILE |
|||
|
|||
function usage { |
|||
echo |
|||
echoMainTitle "Configures Git Server Connection" |
|||
echo |
|||
echoSubTitle "Usage:" |
|||
echo |
|||
echo "project-manager git:configure-ssh [shortname] [git-name] [ssh-connection-name]" |
|||
echo |
|||
echo "--help Prints this message" |
|||
echo |
|||
} |
|||
|
|||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd)/includes/bash_header" |
|||
|
|||
gitName="$(getArgument "$2" "Git name required" true)" |
|||
sshConnectionName="$(getArgument "$3" "SSH connection name required" true)" |
|||
escapedGitName=${gitName//./\\.} |
|||
setConfig "$shortname" "git.repositories.$escapedGitName.ssh" "$sshConnectionName" |
|||
|
|||
echo |
|||
echoSuccess "SSH Connection ($sshConnectionName) setted for Git: $gitName" |
|||
echo |
@ -0,0 +1,26 @@ |
|||
#!/bin/bash |
|||
|
|||
### DO NOT EDIT THIS FILE |
|||
|
|||
function usage { |
|||
echo |
|||
echoMainTitle "Configures Git Server Url" |
|||
echo |
|||
echoSubTitle "Usage:" |
|||
echo |
|||
echo "project-manager git:configure-url [shortname] [git-name] [url]" |
|||
echo |
|||
echo "--help Prints this message" |
|||
echo |
|||
} |
|||
|
|||
source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &> /dev/null && pwd)/includes/bash_header" |
|||
|
|||
gitName="$(getArgument "$2" "Git name required" true)" |
|||
url="$(getArgument "$3" "Url required" true)" |
|||
escapedGitName=${gitName//./\\.} |
|||
setConfig "$shortname" "git.repositories.$escapedGitName.url" "$url" |
|||
|
|||
echo |
|||
echoSuccess "Git ($gitName) setted url: $url" |
|||
echo |
Write
Preview
Loading…
Cancel
Save
Reference in new issue