Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: include submodules in source archive #1511

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive

# https://github.com/actions/checkout/issues/882
- name: Update tags
Expand Down Expand Up @@ -894,6 +896,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: true
submodules: recursive
- name: Get All Artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -937,6 +940,7 @@ jobs:
with:
fetch-depth: 0
persist-credentials: true
submodules: recursive
- name: Get All Artifacts
uses: actions/download-artifact@v3
with:
Expand Down
7 changes: 7 additions & 0 deletions ci/scripts/source_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ main() {
rm -rf "${base_name}/"
git archive "${revision}" --prefix "${base_name}/" | tar xf -

# Resolve all submodules
while read SUBMODULE; do
SUBMODULE_REV=$(echo "${SUBMODULE}" | awk '{print $1}')
SUBMODULE_PATH=$(echo "${SUBMODULE}" | awk '{print $2}')
git -C "${SUBMODULE_PATH}" archive --prefix="${base_name}/${SUBMODULE_PATH}/" "${SUBMODULE_REV}" | tar xf - -C "${source_top_dir}"
done < <(git submodule status)

# Resolve all hard and symbolic links
rm -rf "${base_name}.tmp/"
mv "${base_name}/" "${base_name}.tmp/"
Expand Down
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ r/*/NEWS.md
r/*/cran-comments.md
r/*/.Rbuildignore
r/*/tests/testthat/_snaps/*
testing/*
Loading