[config] first cut of config rewritten in golang

still to do:
* Rework disk format to be okay with quotes
* Fix Dockerfile deployments
* Dedup code in the subcommands
* Add --encode
* Add deploytests for the new stuff
* Restore some log messages (should I make some helpers in common?)
* Restore some functions that may be used by 3d-party plugins
This commit is contained in:
Alex Quick
2017-01-16 23:13:32 -05:00
parent 5e3184b61d
commit 294d4b1f29
23 changed files with 1187 additions and 312 deletions

32
plugins/config/Makefile Normal file
View File

@@ -0,0 +1,32 @@
.PHONY: build-in-docker build clean
GO_REPO_ROOT ?= /go/src/github.com/dokku/dokku
BUILD_IMAGE ?= golang:1.7.1
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
-w $(GO_REPO_ROOT)/plugins/config \
$(BUILD_IMAGE) \
bash -c "make build" || exit $$?
build: commands subcommands
subcommands: subcommands/export subcommands/set subcommands/get subcommands/unset
commands: **/**/commands.go
go build -a -o commands src/commands/commands.go
subcommands/export: **/**/**/export.go
go build -a -o subcommands/export src/subcommands/export/export.go
subcommands/set: **/**/**/set.go
go build -a -o subcommands/set src/subcommands/set/set.go
subcommands/get: **/**/**/get.go
go build -a -o subcommands/get src/subcommands/get/get.go
subcommands/unset: **/**/**/unset.go
go build -a -o subcommands/unset src/subcommands/unset/unset.go
clean:
rm -rf commands subcommands