forked from toolshed/abra
fix(config): Removes config file name from abra dir
This commit is contained in:
@ -34,7 +34,7 @@ func LoadAbraConfig() Abra {
|
||||
return Abra{}
|
||||
}
|
||||
log.Debugf("config file loaded from: %s", configFile)
|
||||
config.configPath = configFile
|
||||
config.configPath = filepath.Dir(configFile)
|
||||
return config
|
||||
}
|
||||
|
||||
@ -88,16 +88,22 @@ func (a Abra) GetAbraDir() string {
|
||||
return os.ExpandEnv("$HOME/.abra")
|
||||
}
|
||||
|
||||
func (a Abra) GetServersDir() string { return path.Join(a.GetAbraDir(), "servers") }
|
||||
func (a Abra) GetRecipesDir() string { return path.Join(a.GetAbraDir(), "recipes") }
|
||||
func (a Abra) GetVendorDir() string { return path.Join(a.GetAbraDir(), "vendor") }
|
||||
func (a Abra) GetBackupDir() string { return path.Join(a.GetAbraDir(), "backups") }
|
||||
func (a Abra) GetCatalogueDir() string { return path.Join(a.GetAbraDir(), "catalogue") }
|
||||
|
||||
var config = LoadAbraConfig()
|
||||
|
||||
var (
|
||||
ABRA_DIR = config.GetAbraDir()
|
||||
SERVERS_DIR = path.Join(ABRA_DIR, "servers")
|
||||
RECIPES_DIR = path.Join(ABRA_DIR, "recipes")
|
||||
VENDOR_DIR = path.Join(ABRA_DIR, "vendor")
|
||||
BACKUP_DIR = path.Join(ABRA_DIR, "backups")
|
||||
CATALOGUE_DIR = path.Join(ABRA_DIR, "catalogue")
|
||||
RECIPES_JSON = path.Join(ABRA_DIR, "catalogue", "recipes.json")
|
||||
SERVERS_DIR = config.GetServersDir()
|
||||
RECIPES_DIR = config.GetRecipesDir()
|
||||
VENDOR_DIR = config.GetVendorDir()
|
||||
BACKUP_DIR = config.GetBackupDir()
|
||||
CATALOGUE_DIR = config.GetCatalogueDir()
|
||||
RECIPES_JSON = path.Join(config.GetCatalogueDir(), "recipes.json")
|
||||
REPOS_BASE_URL = "https://git.coopcloud.tech/coop-cloud"
|
||||
CATALOGUE_JSON_REPO_NAME = "recipes-catalogue-json"
|
||||
SSH_URL_TEMPLATE = "ssh://git@git.coopcloud.tech:2222/coop-cloud/%s.git"
|
||||
|
Reference in New Issue
Block a user