From 34f47fb9281bb868a0b196d4e5cb982a09aaee47 Mon Sep 17 00:00:00 2001 From: Michael Sprengel Date: Mon, 18 Dec 2023 09:51:07 +0100 Subject: [PATCH] Include submodules in orig.tar --- container/bin/build_source | 1 + 1 file changed, 1 insertion(+) diff --git a/container/bin/build_source b/container/bin/build_source index 349447c..390292e 100755 --- a/container/bin/build_source +++ b/container/bin/build_source @@ -111,6 +111,7 @@ git_source() ( IFS='#' read -r url ref <<< "$1" git clone --jobs $(nproc) --shallow-submodules --recurse-submodules "$url" src.git git -C src.git archive --prefix src/ "$(get_git_tag)" > orig.tar + git -C src.git submodule foreach --recursive "git archive --prefix=src/\$displaypath/ --output=\"$(pwd)/\$sha1.tar\" \"\$sha1\" && tar --concatenate --file=\"$(pwd)/orig.tar\" \"$(pwd)/\$sha1.tar\" && rm \"$(pwd)/\$sha1.tar\"" rm -rf src.git tar -x < orig.tar )