summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-04 21:24:25 +0100
committerxengineering <me@xengineering.eu>2024-01-04 21:28:30 +0100
commit70140597920ef71896283a5ad18538fed5ed99c9 (patch)
tree62439f568070b4e8126ac27098cbf2a6bc11fbb6
parent791f48f6a7e8ea342ca649bfc74d3d82379ca07e (diff)
downloadsoundbox-70140597920ef71896283a5ad18538fed5ed99c9.tar
soundbox-70140597920ef71896283a5ad18538fed5ed99c9.tar.zst
soundbox-70140597920ef71896283a5ad18538fed5ed99c9.zip
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.
-rw-r--r--Makefile21
1 files changed, 20 insertions, 1 deletions
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: