Skip to content

Commit

Permalink
Use --force-submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jan 24, 2024
1 parent b3c1a07 commit 2572df0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions bin/pgxn-bundle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2572df0

Please sign in to comment.