working on lock command
This commit is contained in:
@@ -36,11 +36,18 @@ func FindServer(serverName string, branchName string, conf *clientconfig.Gvcconf
|
||||
if branchName == "" { // If no branch listed select master TODO: in future the 'default' branch will be their current branch
|
||||
branchName = "master"
|
||||
}
|
||||
if serverName == "" { // if no serverName is specified, just use the default
|
||||
for _, remote := range conf.Remotes {
|
||||
if remote.Default {
|
||||
serverName = remote.Name
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, remote := range conf.Remotes {
|
||||
if serverName == remote.Name {
|
||||
fmt.Printf("Server found in config, connecting to: %s, host: %s, port: %d \n", remote.Name, remote.Host, remote.Port)
|
||||
port := ":" + strconv.Itoa(remote.Port)
|
||||
connectionString := "http://" + remote.Host + port + "/" + conf.RepoName //Create our connection string //'http://server:port/:repo' //TODO, what about admin commands for entire server management, not just one repo?
|
||||
connectionString := "http://" + remote.Host + port //Create our connection string //'http://server:port'
|
||||
fmt.Println("Generated connection string: ", connectionString)
|
||||
return connectionString, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user