From 2572df06ab9aabda366d5e6b5981b10f0f65df79 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Wed, 24 Jan 2024 17:05:01 -0500 Subject: [PATCH] Use --force-submodules --- .github/workflows/cicd.yml | 3 +++ bin/pgxn-bundle | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 76b6f33..a52eec8 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -22,6 +22,9 @@ jobs: run: "docker run -w /repo --rm --volume \"$(pwd):/repo\" -e AS_USER=worker pgxn-tools-test ./test/runtest.sh ${{ matrix.pg }} git" - name: Test Git with extra file run: "docker run -w /repo --rm --volume \"$(pwd):/repo\" pgxn-tools-test ./test/runtest.sh ${{ matrix.pg }} git yes" + - name: Test Git with archive-all + env: { GIT_ARCHIVE_CMD: archive-all } + run: "docker run -w /repo --rm --volume \"$(pwd):/repo\" pgxn-tools-test ./test/runtest.sh ${{ matrix.pg }} git" # Test without Git repo - name: Test Zip as root run: "docker run -w /repo --rm --volume \"$(pwd)/test:/repo\" pgxn-tools-test ./runtest.sh ${{ matrix.pg }} zip" diff --git a/bin/pgxn-bundle b/bin/pgxn-bundle index 37246c4..236b8df 100755 --- a/bin/pgxn-bundle +++ b/bin/pgxn-bundle @@ -21,9 +21,9 @@ VERSION="${PGXN_DIST_VERSION:-$(perl -MJSON=decode_json -E 'say decode_json(join release="${DISTNAME}-${VERSION}" cmd="${GIT_ARCHIVE_CMD:-archive}" if [ "true" == "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then - echo "Bundling $release.zip with git archive..." + echo "Bundling $release.zip with git ${cmd}..." if [ "${cmd}" = 'archive-all' ]; then - git archive-all -v --prefix "${release}/" ${GIT_BUNDLE_OPTS:-} "${release}.zip" + git archive-all -v --prefix "${release}/" --force-submodules ${GIT_BUNDLE_OPTS:-} "${release}.zip" else git archive -v --format zip --prefix "${release}/" ${GIT_BUNDLE_OPTS:-} --output "${release}.zip" HEAD fi