From e66f5b43a41283ddf4c4dae10e3b32e1fa0be077 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 20 Dec 2025 14:40:31 +0100 Subject: 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. --- meson.build | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'meson.build') 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, ) -- cgit v1.2.3-70-g09d2