2018-04-17 11:58:40 -07:00
|
|
|
GOFILES := $(shell find . -type f | grep go$$ )
|
|
|
|
|
2018-04-17 15:01:22 -07:00
|
|
|
build/lim: build build/.docker-image ${GOFILES}
|
|
|
|
@echo "fetching binary from image"
|
|
|
|
@docker create --name ext smcquay/lim:latest > /dev/null
|
|
|
|
@docker cp ext:/bin/lim build/ > /dev/null
|
2018-04-17 12:03:44 -07:00
|
|
|
@docker rm -f ext > /dev/null
|
2018-04-17 15:01:22 -07:00
|
|
|
@touch build/lim
|
|
|
|
|
|
|
|
build/.docker-image: ${GOFILES}
|
|
|
|
@echo "building docker image"
|
|
|
|
@docker build --no-cache -t smcquay/lim:latest . > /dev/null
|
|
|
|
@touch build/.docker-image
|
2018-04-17 11:58:40 -07:00
|
|
|
|
|
|
|
build:
|
|
|
|
@mkdir build
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
@rm -rf build
|