mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Fixed the bash-while-subshell problem
This commit is contained in:
parent
308e27b981
commit
dfe06c0747
17
.github/workflows/build-and-release.yml
vendored
17
.github/workflows/build-and-release.yml
vendored
@ -441,11 +441,17 @@ jobs:
|
|||||||
FORMATTED_VERSION: ${{ needs.read_metadata.outputs.formatted_version }}
|
FORMATTED_VERSION: ${{ needs.read_metadata.outputs.formatted_version }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
|
# Export the necessary variables for xargs:
|
||||||
|
export GITHUB_WORKSPACE
|
||||||
|
export FORMATTED_VERSION
|
||||||
|
export platforms_json
|
||||||
|
|
||||||
# Here, we create the JSON object:
|
# Here, we create the JSON object:
|
||||||
platforms_json=$(jq -n '{}')
|
platforms_json=$(jq -n '{}')
|
||||||
|
|
||||||
# Iterate over all signature files:
|
# Function to process each signature file
|
||||||
find $GITHUB_WORKSPACE/artifacts -type f -name '*.sig' -print0 | while IFS= read -r -d '' sig_file; do
|
process_signature() {
|
||||||
|
sig_file="$1"
|
||||||
|
|
||||||
echo "Processing signature file '$sig_file':"
|
echo "Processing signature file '$sig_file':"
|
||||||
|
|
||||||
@ -482,8 +488,13 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo " Error: Could not find the platform file for the signature file '$sig_file'."
|
echo " Error: Could not find the platform file for the signature file '$sig_file'."
|
||||||
fi
|
fi
|
||||||
done
|
}
|
||||||
|
|
||||||
|
# Export the function to make it available to xargs:
|
||||||
|
export -f process_signature
|
||||||
|
|
||||||
|
# Iterate over all signature files using find and xargs:
|
||||||
|
find $GITHUB_WORKSPACE/artifacts -type f -name '*.sig' -print0 | xargs -0 -I {} bash -c 'process_signature "$@"' _ {}
|
||||||
echo "Platforms JSON: '$platforms_json'"
|
echo "Platforms JSON: '$platforms_json'"
|
||||||
|
|
||||||
# Write the JSON object to a temporary file:
|
# Write the JSON object to a temporary file:
|
||||||
|
Loading…
Reference in New Issue
Block a user