Include submodules in the release

Use "git submodule foreach" to include all submodules, even if we
currently have just a single one.
This commit is contained in:
Vadim Zeitlin
2025-04-25 16:29:02 +02:00
parent 43caf0c3c2
commit d385619ed2

View File

@@ -31,6 +31,7 @@ usage()
exit 1
}
ME=`basename "$0"`
SOCI_ROOT="$(readlink -f $(dirname $(readlink -f $0))/..)"
MSG_TAG="| $ME"
UNAME_S="$(uname -s)"
@@ -192,6 +193,13 @@ deactivate
echo "${MSG_TAG} INFO: Preparing release archive in '$SOCI_ARCHIVE'"
git archive --format=tar --prefix=$SOCI_ARCHIVE/ HEAD | tar -xf -
# We use GNU tar -i option to allow successfully extracting files from several
# tar archives concatenated together, without it we'd have to pipe output of
# each git-archive separately.
(git archive --prefix=$SOCI_ARCHIVE/ HEAD;
git submodule foreach --quiet "cd $SOCI_ROOT/\$path && git archive --prefix=$SOCI_ARCHIVE/\$path/ HEAD") |
tar -i xf -
mv site $SOCI_ARCHIVE/docs
# Add git SHA-1 to version in CHANGES file