Skip to content

Commit

Permalink
refactor(automation-script): Create 'Samples~' dir only if doesn't ex…
Browse files Browse the repository at this point in the history
…ists, but always copy the content of regular 'Samples' dir
  • Loading branch information
mfdeveloper committed Feb 15, 2024
1 parent 7cd23e5 commit 95e250c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ renameInvalidDirs() {
chmod -R 777 "$PKG_ROOT/"

# Rename UPM special directories with suffix "~"
if [ -d "$PKG_ROOT/Samples" ] && [ ! -d "$PKG_ROOT/Samples~" ]
if [ -d "$PKG_ROOT/Samples" ]
then
# PS: Replaced "mv" to "copy" + "remove" of Samples~ dir, because sometimes
# shows the error Permission Denied. Specially if Samples
# have several sub-directories
mkdir -p "$PKG_ROOT/Samples~"
cp -R "$PKG_ROOT/Samples/." "$PKG_ROOT/Samples~/"
# have several sub-directories
if [ ! -d "$PKG_ROOT/Samples~" ]
then
mkdir -p "$PKG_ROOT/Samples~"
fi

cp -Rf "$PKG_ROOT/Samples/." "$PKG_ROOT/Samples~/"

rm -rf "$PKG_ROOT/Samples"
rm -f "$PKG_ROOT/Samples.meta"
Expand Down
2 changes: 1 addition & 1 deletion Packages/com.benoitfreslon.vibration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "Vibration",
"description": "Native free plugin for Unity for Android, iOS and WebGL. Use custom vibrations/haptics on mobile.",
"unity": "2019.3",
"version": "0.1.9",
"version": "0.1.10",
"keywords": [],
"devDependencies": {
"cross-var": "^1.1.0",
Expand Down

0 comments on commit 95e250c

Please sign in to comment.