Skip to content

Commit

Permalink
automataCI: fixed TARGET_OS and TARGET_ARCH extension pickup bug
Browse files Browse the repository at this point in the history
It appears the TARGET_OS and TARGET_ARCH project variables are
picking up compounded file extensions pattern. Hence, we need to
clean them up. Let's do this.

This patch fixes TARGET_OS and TARGET_ARCH extension pickup bug
in automataCI/ directory.

Co-authored-by: Shuralyov, Jean <jean.shuralyov@proton.me>
Co-authored-by: Galyna, Cory <cory.galyna@gmail.com>
Co-authored-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
Signed-off-by: (Holloway) Chew, Kean Ho <hollowaykeanho@gmail.com>
  • Loading branch information
3 people committed May 21, 2024
1 parent e372d4f commit 004aaae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion automataCI/package_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ for i in "${PROJECT_PATH_ROOT}/${PROJECT_PATH_BUILD}"/*; do
TARGET_FILENAME="${TARGET_FILENAME%.*}"
TARGET_OS="${TARGET_FILENAME##*_}"
TARGET_FILENAME="${TARGET_FILENAME%%_*}"
TARGET_ARCH="${TARGET_OS##*-}"
TARGET_ARCH="${TARGET_ARCH##*-}"
TARGET_ARCH="${TARGET_ARCH%%.*}"
TARGET_OS="${TARGET_OS%%-*}"
TARGET_OS="${TARGET_OS%%.*}"

if [ "$(STRINGS_Is_Empty "$TARGET_OS")" -eq 0 ] ||
[ "$(STRINGS_Is_Empty "$TARGET_ARCH")" -eq 0 ] ||
Expand Down
4 changes: 3 additions & 1 deletion automataCI/package_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ foreach ($file in (Get-ChildItem -Path "${env:PROJECT_PATH_ROOT}\${env:PROJECT_P
$TARGET_FILENAME = $TARGET_FILENAME -replace "\..*$"
$TARGET_OS = $TARGET_FILENAME -replace ".*_"
$TARGET_FILENAME = $TARGET_FILENAME -replace "_.*"
$TARGET_ARCH = $TARGET_OS -replace ".*-"
$TARGET_ARCH = $TARGET_ARCH -replace ".*-"
$TARGET_ARCH = $TARGET_ARCH -replace "\..*$"
$TARGET_OS = $TARGET_OS -replace "-.*"
$TARGET_OS = $TARGET_OS -replace "\..*$"

if (($(STRINGS-Is-Empty "${TARGET_OS}") -eq 0) -or
($(STRINGS-Is-Empty "${TARGET_ARCH}") -eq 0) -or
Expand Down

0 comments on commit 004aaae

Please sign in to comment.