summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-07-26 19:15:06 +0200
committerxengineering <me@xengineering.eu>2025-07-26 19:15:06 +0200
commit11078651756014631166cb8f0bf2d8bce18e56d1 (patch)
treed2e7e262d5f7dbbec4a41b5d86c1955b73b6a1c2 /meson.build
parentd3e7f19f1f87b03e9a7c8a170b9c4351ac565268 (diff)
parent376a2f91964527bfb6b57661a9e81a4d5544f288 (diff)
downloadiot-contact-11078651756014631166cb8f0bf2d8bce18e56d1.tar
iot-contact-11078651756014631166cb8f0bf2d8bce18e56d1.tar.zst
iot-contact-11078651756014631166cb8f0bf2d8bce18e56d1.zip
Merge implementation of tar archive deployment
Deploying all build artifacts in a single tar archive file makes deployment easier. The bundle stays consistent, GPG signatures can later easily provided too, the archive and its top-level directory can have the same and long name and the further paths in the archive can stay short.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build36
1 files changed, 32 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 9b7d7c1..7549940 100644
--- a/meson.build
+++ b/meson.build
@@ -1,13 +1,41 @@
-project('iot-contact')
+project(
+ 'iot-contact',
+ version : '0.0.0-dev',
+)
-cp = find_program('cp', required : true)
+tar = find_program('tar', required : true)
fs = import('fs')
+project_version_string = meson.project_name() + '-v' + meson.project_version()
+
+html = fs.copyfile(meson.current_source_dir() / 'web' / 'index.html')
css = fs.copyfile(meson.current_source_dir() / 'simple.css' / 'simple.css')
subdir('tools')
subdir('fw')
subdir('pcb')
-subdir('web')
-subdir('artifacts')
+
+artifacts = [
+ html,
+ css,
+ schematic,
+ bom,
+ simulation,
+ update_image,
+ factory_image,
+ kicad_pcb,
+]
+
+custom_target(
+ output: project_version_string + '.tar.zst',
+ command: [
+ tar,
+ '--zstd',
+ '--transform=s|^|' + project_version_string + '/|',
+ '-cf', '@OUTPUT@',
+ artifacts,
+ ],
+ depends: artifacts,
+ build_by_default: true,
+)