Skip to content

Commit ecc8547

Browse files
Change on-release code for combining multiple dirs with rsync
1 parent 7cbf86d commit ecc8547

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.github/scripts/on-release.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
#!/bin/bash
2+
if [ -z "$GITHUB_WORKSPACE" ]; then
3+
export GITHUB_WORKSPACE="$PWD"
4+
export GITHUB_REPOSITORY="francisduvivier/arduino-esp32-fri3d"
5+
export GITHUB_EVENT_NAME="release"
6+
export GITHUB_EVENT_PATH="$GITHUB_WORKSPACE/.github/test-release-published-event.json"
7+
fi
28

3-
export BASE_DIR="$GITHUB_WORKSPACE/arduino-esp32-fork"
9+
export BASE_DIR="$GITHUB_WORKSPACE/arduino-esp32"
10+
export UPSTREAM_DIR="$GITHUB_WORKSPACE/arduino-esp32-fork"
411
export MODS_DIR="$GITHUB_WORKSPACE/arduino-esp32-fork-mods"
512

13+
# Clone updstream code
14+
echo "Start Cloning espressif/arduino-esp32"
15+
rsync -av "$UPSTREAM_DIR/" "$BASE_DIR/"
16+
echo "Done Cloning espressif/arduino-esp32"
17+
18+
# Overwrite the files in BASE_DIR with files MODS_DIR
19+
echo "Start Copying Fri3d arduino-esp32 mods"
20+
rsync -av "$MODS_DIR/" "$BASE_DIR/"
21+
echo "Done Copying Fri3d arduino-esp32 mods"
22+
23+
624
if [[ ! $GITHUB_EVENT_NAME == "release" ]]; then
725
echo "Wrong event '$GITHUB_EVENT_NAME'!"
826
exit 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"action": "published"
3+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/arduino-esp32/

0 commit comments

Comments
 (0)