Compare commits
3 Commits
b9894265d0
...
ec9175bf45
Author | SHA1 | Date |
---|---|---|
Lance Vick | ec9175bf45 | |
Lance Vick | a5ab6f8dcd | |
Lance Vick | f966d23708 |
10
Makefile
10
Makefile
|
@ -57,7 +57,7 @@ include $(CONFIG_DIR)/make.env
|
|||
export $(shell sed 's/=.*//' $(CONFIG_DIR)/make.env)
|
||||
|
||||
## Use env vars from existing release if present
|
||||
ifneq (,$(wildcard $(DIST_DIR)/release.env))
|
||||
ifeq ($(REPRODUCE),"true")
|
||||
include $(DIST_DIR)/release.env
|
||||
export
|
||||
endif
|
||||
|
@ -141,8 +141,7 @@ toolchain-clean:
|
|||
.PHONY: reproduce
|
||||
reproduce: toolchain-clean
|
||||
mkdir -p $(OUT_DIR)
|
||||
cp $(DIST_DIR)/release.env $(OUT_DIR)/release.env
|
||||
$(MAKE) TARGET=$(TARGET) VERSION=$(VERSION)
|
||||
$(MAKE) REPRODUCE="true"
|
||||
diff -q $(OUT_DIR) $(DIST_DIR) \
|
||||
&& echo "Success: $(OUT_DIR) and $(DIST_DIR) are identical"
|
||||
|
||||
|
@ -152,10 +151,9 @@ $(DIST_DIR):
|
|||
&& { echo "Error: Git has untracked files present"; exit 1; } || :
|
||||
git diff --name-only | grep . \
|
||||
&& { echo "Error: Git has unstaged changes present"; exit 1; } || :
|
||||
rm -rf $@/*
|
||||
[ "$(PRESERVE_CACHE)" = "true" ] || $(MAKE) toolchain-clean
|
||||
$(MAKE) default
|
||||
cp -R $(OUT_DIR)/* $@/
|
||||
cp -Rp $(OUT_DIR)/* $@/
|
||||
|
||||
$(BIN_DIR):
|
||||
mkdir -p $@
|
||||
|
@ -234,7 +232,7 @@ $(CACHE_DIR_ROOT)/toolchain.state: \
|
|||
docker load -i $(CACHE_DIR_ROOT)/toolchain.tar
|
||||
docker images --no-trunc --quiet $(IMAGE) > $@
|
||||
|
||||
$(OUT_DIR)/release.env: | $(OUT_DIR)
|
||||
$(OUT_DIR)/release.env: $(shell git ls-files)
|
||||
echo 'VERSION=$(VERSION)' > $(OUT_DIR)/release.env
|
||||
echo 'GIT_REF=$(GIT_REF)' >> $(OUT_DIR)/release.env
|
||||
echo 'GIT_AUTHOR=$(GIT_AUTHOR)' >> $(OUT_DIR)/release.env
|
||||
|
|
Reference in New Issue