From 70140597920ef71896283a5ad18538fed5ed99c9 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 4 Jan 2024 21:24:25 +0100 Subject: Provide artifacts folder including build archives All build files relevant for users (artifacts) should be provided in build/artifacts. This folder has subdirectories for every revision and a corresponding Zstandard-compressed Tar archive. This archive contains the full result of the build of the current source directory and can easily be shared. --- Makefile | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c706f5e..7e1f736 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,25 @@ BUILD_DIR := ./build +ARTIFACTS_DIR := $(BUILD_DIR)/artifacts +VERSION := $(shell git describe --dirty --long --always) +TARGET_NAME := soundbox-$(VERSION) +TARGET_DIR := $(ARTIFACTS_DIR)/$(TARGET_NAME) +ARCHIVE := $(ARTIFACTS_DIR)/$(TARGET_NAME).tar.zst -all: doc mech +all: $(ARCHIVE) + +$(ARCHIVE): $(TARGET_DIR) + tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME) + +$(TARGET_DIR): doc mech + rm -rf $@ + mkdir -p $@ + install -Dm 644 $(BUILD_DIR)/doc/soundbox-documentation.pdf $@ + install -Dm 644 $(BUILD_DIR)/mech/assembly.gcode $@ + install -Dm 644 $(BUILD_DIR)/mech/assembly.stl $@ + install -Dm 644 $(BUILD_DIR)/mech/production.gcode $@ + install -Dm 644 $(BUILD_DIR)/mech/production.stl $@ + install -Dm 644 $(BUILD_DIR)/mech/pcb_case/tolerance_tests.gcode $@ + install -Dm 644 $(BUILD_DIR)/mech/pcb_case/tolerance_tests.stl $@ .PHONY: clean clean: -- cgit v1.2.3-70-g09d2