summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-12-20 14:40:31 +0100
committerxengineering <me@xengineering.eu>2025-12-20 14:40:31 +0100
commite66f5b43a41283ddf4c4dae10e3b32e1fa0be077 (patch)
treebf99626503a191ac8c052bda3c946ffdb59948ba
parente4eeebd12a41b65da02087d93e19ee719723fd8b (diff)
downloadsia-server-e66f5b43a41283ddf4c4dae10e3b32e1fa0be077.tar
sia-server-e66f5b43a41283ddf4c4dae10e3b32e1fa0be077.tar.zst
sia-server-e66f5b43a41283ddf4c4dae10e3b32e1fa0be077.zip
Add tar archive generation for deployment
Bundling all build artifacts into one tar archive is good practise to make deployment easier and underline which files in the build directory are important. zstd was picked for compression because of the very good compression ratio.
-rw-r--r--meson.build17
1 files changed, 16 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index adcde65..c550710 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,7 @@
project('sia-server')
go = find_program('go', required : true)
+tar = find_program('tar', required : true)
sia_server_linux_amd64 = custom_target(
input : [
@@ -20,7 +21,21 @@ sia_server_linux_amd64 = custom_target(
'@OUTPUT@',
'@INPUT@',
],
- depend_files : [
+)
+
+artifacts = [
+ sia_server_linux_amd64,
+]
+
+archive = custom_target(
+ input : artifacts,
+ output : 'sia-server.tar.zst',
+ command : [
+ tar,
+ '--zstd',
+ '-cf',
+ '@OUTPUT@',
+ '@INPUT@',
],
build_by_default : true,
)