Skip to content

Commit a734711

Browse files
committed
package.sh: explicitly list files to include in the package
Reduce the number of files included in the packaged core by explicitly listing the ones to include.
1 parent 0a44403 commit a734711

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

.github/workflows/package_core.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
- name: Package
5151
run: |
5252
./extra/package.sh ${{ env.CORE_TAG }}
53-
mv ../${{ env.CORE_ARTIFACT }}.tar.bz2 .
5453
5554
- name: Archive core
5655
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
extra/post_build_tool/distrib/
22
build/
33
venv/
4+
ArduinoCore-zephyr-*.tar.bz2

extra/package.lst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
boards.txt
2+
platform.txt
3+
programmers.txt
4+
LICENSE
5+
README.md
6+
doc/
7+
cores/
8+
libraries/
9+
firmwares/
10+
variants/

extra/package.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
#!/bin/bash
22

3-
if [ ! -f platform.txt ]; then
4-
echo Launch this script from the root core folder as ./extras/package.sh VERSION
5-
exit 2
3+
set -e
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: $0 VERSION"
7+
exit 1
68
fi
79

8-
FOLDER=`basename $PWD`
10+
if [ ! -f platform.txt ]; then
11+
echo "Launch this script from the root core folder as ./extra/package.sh VERSION"
12+
exit 2
13+
fi
914

15+
PACKAGE=ArduinoCore-zephyr
1016
VERSION=$1
1117

12-
cd ..
13-
tar --exclude=extras/** --exclude=.git* --exclude=build --exclude=venv --exclude=samples -cjhf ArduinoCore-zephyr-${VERSION}.tar.bz2 $FOLDER
18+
tar -cjhf ${PACKAGE}-${VERSION}.tar.bz2 -T extra/package.lst --transform "s,^,${PACKAGE}/,"

0 commit comments

Comments
 (0)