Fix Gerrit root directory

The common.env file is included from different Makefiles, depending on
the target. Depending on the caller, MAKEFILE_LIST has different values,
hence it is not possible to always get the last value to determine the
Gerrit directory.

The invocation will always happen for sure from a subdirectory of root.
The '../gerrit' directory change will ensure the Gerrit directory value
will be added to the root one.

Change-Id: I62b85097007c45709419848a47802c35f8850a94
diff --git a/common.env b/common.env
index 592a4ea..2e34ee3 100644
--- a/common.env
+++ b/common.env
@@ -13,7 +13,7 @@
 LAST_BUILD=lastSuccessfulBuild/artifact/bazel-bin/plugins
 
 # Image version
-IMAGE_DIR=$(dir $(realpath $(lastword $(MAKEFILE_LIST))))gerrit
+IMAGE_DIR:=$(shell pwd)/../gerrit
 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