summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: