Fix SHA1 computation for haproxy / syslog-sidecar

Change-Id: Ideb88dcf8f37e33247e4bfb4d300ad49ef2f553f
diff --git a/common.env b/common.env
index 2e34ee3..a780818 100644
--- a/common.env
+++ b/common.env
@@ -12,11 +12,14 @@
 GERRIT_CI=https://gerrit-ci.gerritforge.com/view/Plugins-$(GERRIT_BRANCH)/job
 LAST_BUILD=lastSuccessfulBuild/artifact/bazel-bin/plugins
 
-# Image version
+# Image directories
 IMAGE_DIR:=$(shell pwd)/../gerrit
+HAPROXY_IMAGE_DIR=$(shell pwd)/haproxy
+SYSLOG_IMAGE_DIR=$(shell pwd)/syslog-sidecar
+
+# Image SHA1 versions
 HEAD_SHA1=$(shell find $(IMAGE_DIR) -type f -exec cat {} \; | shasum | cut -c 1-20)
-IMAGE_TAG=$(GERRIT_VERSION).$(GERRIT_PATCH)-$(HEAD_SHA1)
-HAPROXY_IMAGE_DIR=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))haproxy
 HAPROXY_HEAD_SHA1=$(shell find $(HAPROXY_IMAGE_DIR) -type f -exec cat {} \; | shasum | cut -c 1-20)
-SYSLOG_IMAGE_DIR=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))syslog-sidecar
 SYSLOG_HEAD_SHA1=$(shell find $(SYSLOG_IMAGE_DIR) -type f -exec cat {} \; | shasum | cut -c 1-20)
+
+IMAGE_TAG=$(GERRIT_VERSION).$(GERRIT_PATCH)-$(HEAD_SHA1)