From d154f320790a7b78e71448c19f9b9ce80a66efaa Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Fri, 15 Jan 2021 18:52:09 +0000 Subject: [PATCH] Fix the build script to compile the bootstrap in a container --- Makefile | 4 ++-- bootstrap/Dockerfile | 2 +- bootstrap/Makefile | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f333092..9a0adba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -THIS_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) +ROOT_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) -include $(THIS_DIR)/bootstrap/Makefile +include $(ROOT_DIR)/bootstrap/Makefile .PHONY: compile compile: compile-bootstrap diff --git a/bootstrap/Dockerfile b/bootstrap/Dockerfile index 54d1f1c..2db5a60 100644 --- a/bootstrap/Dockerfile +++ b/bootstrap/Dockerfile @@ -5,7 +5,7 @@ RUN mkdir -p /usr/src/serene WORKDIR /usr/src/serene COPY go.mod go.sum ./ -RUN go mod download +RUN go mod download -x COPY . . # Build the Go app RUN go build -v ./serene.go diff --git a/bootstrap/Makefile b/bootstrap/Makefile index cf18950..374cea6 100644 --- a/bootstrap/Makefile +++ b/bootstrap/Makefile @@ -1,7 +1,9 @@ BOOTSTRAP_TAG ?= latest +BOOTSTRAP_DIR = $(ROOT_DIR)/bootstrap compile-bootstrap: - docker build -t serene-lang/serene-bootstrap:$(BOOTSTRAP_TAG) . + echo ">>>>>>>>>>> $(BOOTSTRAP_DIR)" + docker build -t serene-lang/serene-bootstrap:$(BOOTSTRAP_TAG) $(BOOTSTRAP_DIR) clean-bootstrap: docker rmi serene-lang/serene-bootstrap:$(BOOTSTRAP_TAG)