refactor: use only a single implementation for cache purging

This change moves cache clearing into the repo plugin, and standardizes on a single way of clearing the cache.
This commit is contained in:
Jose Diaz-Gonzalez
2019-07-05 16:12:22 -04:00
parent 33423a0508
commit 69e4cd7c44
5 changed files with 71 additions and 46 deletions

View File

@@ -3,7 +3,7 @@ include ../../common.mk
GO_ARGS ?= -a
SUBCOMMANDS = subcommands/gc subcommands/purge-cache
TRIGGERS = triggers/pre-delete
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
@@ -11,7 +11,8 @@ build-in-docker: clean
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
build: commands subcommands
build: commands subcommands triggers
$(MAKE) triggers-copy
commands: **/**/commands.go
go build $(GO_ARGS) -o commands src/commands/commands.go
@@ -22,7 +23,15 @@ subcommands/%: src/subcommands/*/%.go
go build $(GO_ARGS) -o $@ $<
clean:
rm -rf commands subcommands
rm -rf commands subcommands triggers pre-delete
src-clean:
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
triggers: $(TRIGGERS)
triggers/%: src/triggers/*/%.go
go build $(GO_ARGS) -o $@ $<
triggers-copy:
cp triggers/* .