refactor: apps -> recipes

This commit is contained in:
2021-12-25 14:04:07 +01:00
parent 3b5354b2a5
commit 4283f130a2
21 changed files with 72 additions and 67 deletions

View File

@ -136,7 +136,7 @@ func recipeCatalogueFSIsLatest() (bool, error) {
return false, err
}
info, err := os.Stat(config.APPS_JSON)
info, err := os.Stat(config.RECIPES_JSON)
if err != nil {
if os.IsNotExist(err) {
logrus.Debugf("no recipe catalogue found in file system cache")
@ -185,7 +185,7 @@ func ReadRecipeCatalogue() (RecipeCatalogue, error) {
// readRecipeCatalogueFS reads the catalogue from the file system.
func readRecipeCatalogueFS(target interface{}) error {
recipesJSONFS, err := ioutil.ReadFile(config.APPS_JSON)
recipesJSONFS, err := ioutil.ReadFile(config.RECIPES_JSON)
if err != nil {
return err
}
@ -194,7 +194,7 @@ func readRecipeCatalogueFS(target interface{}) error {
return err
}
logrus.Debugf("read recipe catalogue from file system cache in %s", config.APPS_JSON)
logrus.Debugf("read recipe catalogue from file system cache in %s", config.RECIPES_JSON)
return nil
}
@ -210,7 +210,7 @@ func readRecipeCatalogueWeb(target interface{}) error {
return err
}
if err := ioutil.WriteFile(config.APPS_JSON, recipesJSON, 0764); err != nil {
if err := ioutil.WriteFile(config.RECIPES_JSON, recipesJSON, 0764); err != nil {
return err
}
@ -437,7 +437,7 @@ func GetRecipeFeaturesAndCategory(recipeName string) (features, string, error) {
var category string
readmePath := path.Join(config.ABRA_DIR, "apps", recipeName, "README.md")
readmePath := path.Join(config.RECIPES_DIR, recipeName, "README.md")
logrus.Debugf("attempting to open %s for recipe metadata parsing", readmePath)
@ -509,7 +509,7 @@ func GetRecipeFeaturesAndCategory(recipeName string) (features, string, error) {
func GetRecipeVersions(recipeName string) (RecipeVersions, error) {
versions := RecipeVersions{}
recipeDir := path.Join(config.ABRA_DIR, "apps", recipeName)
recipeDir := path.Join(config.RECIPES_DIR, recipeName)
logrus.Debugf("attempting to open git repository in %s", recipeDir)