From cc69fef4b7e1587a91a0603d4bd1a46d0b133dd5 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Tue, 13 Dec 2016 00:24:01 -0600 Subject: Initial Setup (#1) * Add basic files * Add eslint file * Add docker files * Update readme * Add circle CI Config * Use actual test ci command * Don't build on test_ci * Add a dockerignore file * Install newer version of docker compose * Install newer docker on circle CI * Restore docker services * Use docker run to propagate exit status * Copy package.json into docker * Push image on success * Push develop/master to dockerhub * Add travis file since circle env is odd * Remove circle ci config * Account for http style origins * Add docker build command to travis * Add contributing text * Add the changelog --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c917346 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ + +# Never directly modify the default environment +environment = development + +repo_full_name = $(shell git remote -v | grep origin | grep push | grep -o '[^:/]\+\/[^/]\+\s\+' | grep -o '[^:]\+\/[^. ]\+') +git_sha = $(shell git rev-parse --short HEAD) +git_branch = $(shell git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3) +whoami = $(shell whoami) + +default: build + +build: docker-build + +run: build + docker-compose up + +package: build + +upload: build + docker push $(repo_full_name) + +clean: clean-docker-build + +test_ci: + docker-compose --project-name ci_build -f test/docker-compose-ci.yml run dasein + +docker-build: + docker build --force-rm -t $(repo_full_name):$(git_sha) . + docker tag $(repo_full_name):$(git_sha) $(repo_full_name):latest + +# Dashes before the commands below indicate a non-zero exit status is okay. +clean-docker-build: + -docker rm $(repo_full_name):$(git_sha) + -docker rmi $(repo_full_name):$(git_sha) -- cgit