Compare commits

..

3 Commits

1 changed files with 4 additions and 6 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
ifneq (,$(wildcard $(DIST_DIR)/release.env)) ifeq ($(REPRODUCE),"true")
include $(DIST_DIR)/release.env include $(DIST_DIR)/release.env
export export
endif endif
@ -141,8 +141,7 @@ toolchain-clean:
.PHONY: reproduce .PHONY: reproduce
reproduce: toolchain-clean reproduce: toolchain-clean
mkdir -p $(OUT_DIR) mkdir -p $(OUT_DIR)
cp $(DIST_DIR)/release.env $(OUT_DIR)/release.env $(MAKE) REPRODUCE="true"
$(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"
@ -152,10 +151,9 @@ $(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 -R $(OUT_DIR)/* $@/ cp -Rp $(OUT_DIR)/* $@/
$(BIN_DIR): $(BIN_DIR):
mkdir -p $@ mkdir -p $@
@ -234,7 +232,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: | $(OUT_DIR) $(OUT_DIR)/release.env: $(shell git ls-files)
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