Skip to content

Commit df91961

Browse files
rob1997robGG1997
andauthored
CI Improvements (#986)
* Revert "automated duplicating imported samples modifications (#595)" This reverts commit a555894. * made main package testable, revert due to a mistake * moved duplicate samples from vars to txt * ci test * possible fix * possible fix 2 * added a debug echo * fix 3 * fix 4 * fix 5 * fix 6 * fix 7 * fix 8 * fix 9 * fix 10 * fix 11 * fix 12 * made publish dependencies check line by line * new line fix * revert test changes --------- Co-authored-by: robGG1997 <[email protected]>
1 parent e0a3a7b commit df91961

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

.github/workflows/check_and_commit.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,23 @@ jobs:
3131
export DESTINATION_DIRECTORY=
3232
export DESTINATION_PATH=
3333
34-
export DUPLICATE_SAMPLE_VARS=${{ vars.DUPLICATE_SAMPLE_VARS }}
35-
36-
for entry in "${DUPLICATE_SAMPLE_VARS[@]}"
34+
while IFS= read -r entry || [ -n "$entry" ];
3735
do
36+
3837
IFS=':' read -ra dirs <<< "$entry"
3938
SOURCE_PATH=${dirs[0]}
4039
DESTINATION_DIRECTORY=${dirs[1]}
41-
40+
4241
SOURCE_PATH="${GITHUB_WORKSPACE}/$SOURCE_PATH/$(ls "$SOURCE_PATH" | head -n 1)/$DESTINATION_DIRECTORY"
4342
4443
DESTINATION_PATH="${GITHUB_WORKSPACE}/${dirs[2]}"
45-
44+
4645
rm -rf "$DESTINATION_PATH"
4746
mkdir -p "$DESTINATION_PATH"
4847
cp -r "$SOURCE_PATH/." "$DESTINATION_PATH"
4948
5049
git add "$DESTINATION_PATH." -f
51-
done
50+
done < "${GITHUB_WORKSPACE}/scripts/data/duplicate_samples.txt"
5251
- name: update submodules
5352
# clone submodules
5453
run: |
@@ -68,14 +67,9 @@ jobs:
6867
6968
echo -e "DLLs Generated\n$(ls "$PUBLISH_PATH")"
7069
71-
export PACKAGE_DEPENDENCIES=($(<${GITHUB_WORKSPACE}/scripts/data/published_dependencies.txt))
72-
73-
PACKAGE_DEPENDENCIES="${PACKAGE_DEPENDENCIES//$'\n'/ }"
74-
PACKAGE_DEPENDENCIES="${PACKAGE_DEPENDENCIES//$'\r'/}"
75-
7670
export DLL_META_FILE_TEMPLATE="${{ vars.DLL_META_FILE_TEMPLATE }}"
7771
78-
for entry in "${PACKAGE_DEPENDENCIES[@]}"
72+
while IFS= read -r entry || [ -n "$entry" ];
7973
do
8074
IFS=':' read -ra dirs <<< "$entry"
8175
export PACKAGE_LIB_PATH="${GITHUB_WORKSPACE}/${dirs[0]}"
@@ -97,7 +91,7 @@ jobs:
9791
done
9892
9993
git add "$PACKAGE_LIB_PATH." -f
100-
done
94+
done < "${GITHUB_WORKSPACE}/scripts/data/published_dependencies.txt"
10195
- uses: actions/cache@v2
10296
with:
10397
path: ${{ matrix.projectPath }}/Library

scripts/data/duplicate_samples.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
src/UnitySampleProject/Assets/Samples/web3.unity SDK:Web3.Unity Samples:Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/
2+
src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth:Web3.Unity Web3Auth Samples:Packages/io.chainsafe.web3-unity.web3auth/Samples~/Web3.Unity Web3Auth/
3+
src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes:Chainlink Lootbox Sample:Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/
4+
src/UnitySampleProject/Assets/Samples/web3.unity SDK Ramp:Web3.Unity Ramp Samples:Packages/io.chainsafe.web3-unity.ramp/Samples~/Web3.Unity Ramp Samples/

0 commit comments

Comments
 (0)