From 1f6580ebc517a1589932e8ea8dfb2051b597bdd4 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 31 Aug 2022 14:15:14 +1000 Subject: [PATCH] Fixing regression bug caused by DELIMITER change in the supported devices script + Adding ability to manually run "Supported Devices" job + Changing `Delimiter` from UTF8 to ASCII character --- .gitlab-ci.yml | 3 +++ scripts/build-supported-devices-md.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d62e2f83..6680089b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,6 +51,9 @@ before_script: rules: - if: '$CI_PROJECT_PATH == "CalcProgrammer1/OpenRGB"' when: on_success + - if: $CI_PIPELINE_SOURCE == "push" + when: manual + allow_failure: true #-----------------------------------------------------------------------# # Linux (AppImage) 32-bit Build Target # diff --git a/scripts/build-supported-devices-md.sh b/scripts/build-supported-devices-md.sh index d231d00b..d4aee4ba 100755 --- a/scripts/build-supported-devices-md.sh +++ b/scripts/build-supported-devices-md.sh @@ -23,7 +23,7 @@ MAIN_FILE='Supported Devices.md' #make -j$(nproc) ## The HID list is produced from each "REGISTER_DETECTOR" macro replacement. -DELIMITER='‖' +DELIMITER=$'\x01' ## | callback_function | VID | PID | Name | HID_LIST=$(grep -hR -e "static\ HIDDeviceDetector" . | cut -d '(' -f 2- | awk -F , -v delim="${DELIMITER}" '{ print $2 ":"delim $3 delim $4 delim $1 delim }') I2C_LIST=$(grep -hR -e "static\ I2CPCIDeviceDetector" . | cut -d '(' -f 2- | awk -F , -v delim="${DELIMITER}" '{ print $2 ":"delim $3 delim $4 delim $5 delim $6 delim $1 delim }') @@ -233,7 +233,7 @@ do do case $type in USB) - IFS="${DELIMITER}" read null vid pid device_name null <<<"$device" + IFS="${DELIMITER}" read null vid pid device_name null <<< "${device}" #Remove leading hex signifier from $vid and $pid vid=${vid/0x/} pid=${pid/0x/}