minor refactor

- simplify CSV reading logic
- add more comments
- rework the packaging script
- remove debug information for git tags
This commit is contained in:
Jonatan Czarniecki 2025-06-08 15:57:24 +02:00
parent e21cbd1f63
commit cbb31f2183
No known key found for this signature in database
GPG key ID: 8B5FB251A803BDD0
6 changed files with 87 additions and 31 deletions

View file

@ -17,9 +17,15 @@ runs:
steps:
- name: Convert input targets to Bash array
# read comma-separated list of targets, converts it to
# an array of arguments for cargo-zigbuild like this:
# [ "--target", "<target1>", "--target", "<target2>", ... ]
shell: bash
run: |
readarray -d $'\0' -t targets < <(awk -F, '{ for (i = 1; i <= NF; i++) printf "--target\0%s\0", $i }' <<< "${{ inputs.targets }}")
targets=()
while IFS=',' read -r target
do targets+=("--target" "$target")
done <<< "${{ inputs.targets }}"
declare -p targets > /tmp/targets.sh
- name: Check with cargo-fmt
@ -27,7 +33,7 @@ runs:
shell: sh
run: cargo fmt -v --all -- --check
- name: Run Clippy
- name: Run Clippy with cargo-zigbuild
if: inputs.lint == true
shell: bash
run: |