Skip to content

Commit c5a49eb

Browse files
committed
Try to dynamically get the bandicoot-code-* directory
1 parent 4624f5c commit c5a49eb

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/upstream-update.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,29 @@ jobs:
7777
# Extract the zip file
7878
unzip temp_download/release.zip -d temp_download
7979
80-
# Create destination directory if it doesn't exist
81-
mkdir -p inst/include
80+
# Find the bandicoot directory
81+
BANDICOOT_DIR=$(find temp_download -name "bandicoot-code-*" -type d | head -1)
82+
echo "Found Bandicoot directory: $BANDICOOT_DIR"
8283
83-
# Find and copy the include directory contents
84-
find temp_download -name "include" -type d -exec cp -r {}/* inst/include/ \;
84+
# Check if include directory exists
85+
if [ -d "$BANDICOOT_DIR/include" ]; then
86+
echo "Found include directory at $BANDICOOT_DIR/include"
87+
88+
# Create destination directory if it doesn't exist
89+
mkdir -p inst/include
90+
91+
# Copy the include directory contents
92+
cp -r $BANDICOOT_DIR/include/* inst/include/
93+
94+
# List copied files for verification
95+
echo "Copied files to inst/include:"
96+
ls -la inst/include/
97+
else
98+
echo "Error: include directory not found in $BANDICOOT_DIR"
99+
echo "Directory contents:"
100+
ls -la $BANDICOOT_DIR
101+
exit 1
102+
fi
85103
86104
# Clean up
87105
rm -rf temp_download
@@ -92,7 +110,7 @@ jobs:
92110
93111
- name: Create Pull Request
94112
if: steps.check-update.outputs.update_needed == 'true'
95-
uses: peter-evans/create-pull-request@v5
113+
uses: peter-evans/create-pull-request@v7
96114
with:
97115
token: ${{ secrets.GITHUB_TOKEN }}
98116
commit-message: "Update to Bandicoot release ${{ steps.get-version.outputs.version }}"

0 commit comments

Comments
 (0)