Compare commits

..

No commits in common. "ec9175bf4546263c83c5e24be9acddcac148e62c" and "b9894265d06618e5c94e17ab03885402db372258" have entirely different histories.

1 changed files with 6 additions and 4 deletions

View File

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