refactor: split out config logic to remove need to check app name for function-based usage

This MR splits out the logic such that there is now a binary that handles function based calls without validating the app name. We should only every check the app name for the subcommands and not internally. Internal calls should have their arguments taken at face value.
This commit is contained in:
Jose Diaz-Gonzalez
2022-05-21 14:42:01 -04:00
parent b3d7174a7a
commit 5981ff8e9b
6 changed files with 269 additions and 105 deletions

View File

@@ -1,6 +1,12 @@
SUBCOMMANDS = subcommands/bundle subcommands/clear subcommands/export subcommands/get subcommands/keys subcommands/show subcommands/set subcommands/unset
TRIGGERS = triggers/config-export triggers/config-get triggers/config-get-global
BUILD = commands subcommands triggers
BUILD = commands config_sub subcommands triggers
PLUGIN_NAME = config
clean-config_sub:
rm -rf config_sub
config_sub: clean-config_sub **/**/config_sub.go
go build -ldflags="-s -w" $(GO_ARGS) -o config_sub src/config_sub/config_sub.go
include ../../common.mk