refactor: move the labels to the properties folder

To be quite honest, these should just be in the docker-options plugin, but I think its fine to have them tracked separately for now.
This commit is contained in:
Jose Diaz-Gonzalez
2025-11-16 17:59:46 -05:00
parent 01570012c5
commit e397604841
8 changed files with 78 additions and 1 deletions

View File

@@ -540,6 +540,14 @@ func PropertySetup(pluginName string) error {
})
}
func PropertySetupApp(pluginName string, appName string) error {
if err := makePluginAppPropertyPath(pluginName, appName); err != nil {
return fmt.Errorf("Unable to create %s config directory for %s: %s", pluginName, appName, err.Error())
}
return nil
}
func getPropertyPath(pluginName string, appName string, property string) string {
pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName)
return filepath.Join(pluginAppConfigRoot, property)

View File

@@ -104,3 +104,9 @@ fn-plugin-property-setup() {
declare PLUGIN="$1"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "setup" "$PLUGIN"
}
fn-plugin-property-setup-app() {
declare desc="setup the properties for an app"
declare PLUGIN="$1" APP="$2"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "setup-app" "$PLUGIN" "$APP"
}

View File

@@ -194,5 +194,12 @@ func main() {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "setup-app":
appName := flag.Arg(2)
err := common.PropertySetupApp(pluginName, appName)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}
}