From 35de33699ca3da8f1f7267b713c4c93849dfc318 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Erik=20Hedenstro=CC=88m?= <erik@hedenstroem.com>
Date: Thu, 16 Jun 2016 11:10:00 +0200
Subject: [PATCH] minor cleanup

---
 .gitlab-ci.yml | 3 +--
 Makefile       | 6 +++---
 rebar.config   | 3 ++-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 99f4b78..67bf20a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,6 @@
 cache:
   paths:
-  - .rebar3
+    - .rebar3
 
 before_script:
   - export GOROOT=${GO_HOME}
@@ -32,7 +32,6 @@ build:
     - master
     - production
   script:
-    - rebar3 update
     - rebar3 edoc
     - rebar3 as production do tar
     - relinfo.escript -vsn _build/production/rel/consul_proxy/releases/RELEASES > _build/VERSION
diff --git a/Makefile b/Makefile
index 5435eb9..2a9f749 100644
--- a/Makefile
+++ b/Makefile
@@ -21,9 +21,9 @@ release:
 	@$(REBAR) release
 
 image:
-	@$(REBAR) release -d false
-	PLATFORM=x86 envsubst '$$PLATFORM' < apps/consul_proxy/priv/Dockerfile > _build/default/Dockerfile
-	docker build --no-cache=true -t ehedenst/consul_proxy:x86 -f _build/default/Dockerfile _build/default
+	@$(REBAR) do tar
+	REL_VSN=$(shell relinfo.escript -vsn _build/default/rel/consul_proxy/releases/RELEASES) envsubst '$$REL_VSN' < apps/consul_proxy/priv/Dockerfile > _build/default/Dockerfile
+	docker build -t hedenstroem/consul_proxy -f _build/default/Dockerfile _build/default
 
 edoc:
 	@$(REBAR) edoc
diff --git a/rebar.config b/rebar.config
index c67583e..db2b065 100644
--- a/rebar.config
+++ b/rebar.config
@@ -18,7 +18,8 @@
 ]}.
 
 {relx, [
-    {release, {consul_proxy, "0.5.3"}, [consul_proxy]}, {sys_config, "./config/sys.config"},
+    {release, {consul_proxy, "0.5.3"}, [consul_proxy]},
+    {sys_config, "./config/sys.config"},
     {vm_args, "./config/vm.args"},
     {dev_mode, true},
     {include_erts, false},
-- 
GitLab