2023-09-23 17:12:35 +02:00
|
|
|
package db_lib
|
2023-03-06 06:48:03 +01:00
|
|
|
|
2024-10-26 14:56:17 +02:00
|
|
|
import "github.com/semaphoreui/semaphore/util"
|
2023-03-12 21:45:46 +01:00
|
|
|
|
2023-03-06 06:48:03 +01:00
|
|
|
func CreateDefaultGitClient() GitClient {
|
2023-07-23 16:18:02 +02:00
|
|
|
switch util.Config.GitClientId {
|
|
|
|
case util.GoGitClientId:
|
2023-04-25 20:04:03 +02:00
|
|
|
return CreateGoGitClient()
|
2023-07-23 16:18:02 +02:00
|
|
|
case util.CmdGitClientId:
|
|
|
|
return CreateCmdGitClient()
|
2023-04-25 20:04:03 +02:00
|
|
|
default:
|
2023-03-12 21:45:46 +01:00
|
|
|
return CreateCmdGitClient()
|
|
|
|
}
|
2023-03-06 06:48:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func CreateGoGitClient() GitClient {
|
|
|
|
return GoGitClient{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateCmdGitClient() GitClient {
|
|
|
|
return CmdGitClient{}
|
|
|
|
}
|