From 46027fe5362a27c5ceb357d4d882a6abf2de29c6 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Fri, 8 Dec 2023 14:31:39 -0800 Subject: [PATCH] remove rogue test script Signed-off-by: Gene Walters --- test.sh | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 test.sh diff --git a/test.sh b/test.sh deleted file mode 100644 index 21daaa1d..00000000 --- a/test.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -CHANGED_FILES=$(git diff 7901137c1edf74d3f8c7c9fe1081e87cf29a4af2...30cfbab1672419d9f9d8dc123a5da07eb11eb0e9 --name-only) -# Construct the package and os into a json string to be consumed by Github Actions runners -JSON="{\"include\":[" -for FILE in $CHANGED_FILES; do - if [[ $FILE == package_build_list_host_* ]]; then - PLATFORM=$(echo $FILE | sed -n 's/package_build_list_host_\(.*\).json/\1/p') - case $PLATFORM in - linux*) - OS_RUNNER="ubuntu-20.04" - ;; - windows) - OS_RUNNER="windows-latest" # This is bundled with VS2022 - ;; - darwin) - OS_RUNNER="macos-latest" - ;; - *) - OS_RUNNER="windows-latest" # default - ;; - esac - - echo " File: $FILE" - DIFF=$(git diff 7901137c1edf74d3f8c7c9fe1081e87cf29a4af2...30cfbab1672419d9f9d8dc123a5da07eb11eb0e9 --no-ext-diff --unified=0 \ - --exit-code -a --no-prefix -- $FILE | egrep "^\+" | grep Scripts) # Get only the changes that can be built - - echo " Diff: $DIFF" - PACKAGE=$(echo $DIFF | cut -d'"' -f2) - PACKPATH=$(echo $DIFF | egrep -o "package-system/[^ ]*") - DOCKER=$(test -f "$PACKPATH/Dockerfile" && echo 1 || echo 0) - JSONline="{\"package\": \"$PACKAGE\", \"os\": \"$OS_RUNNER\", \"dockerfile\": \"$DOCKER\"}," - if [[ "$JSON" != *"$JSONline"* ]]; then - JSON="$JSON$JSONline" - fi - fi -done - -# Remove last "," and add closing brackets -if [[ $JSON == *, ]]; then - JSON="${JSON%?}" -fi -JSON="$JSON]}" - -echo "Json: $JSON"