Skip to content

Commit

Permalink
aaaa
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejoigny-ledger committed Mar 1, 2024
1 parent f4cbd29 commit 880d260
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,11 @@ jobs:
while true; do
repos=$(curl -s -H "Authorization: token ${{ secrets.API_GITHUB }}" "https://api.github.com/orgs/LedgerHQ/repos?page=$page&per_page=200")
if [[ -z "$repos" ]]; then
echo "break1"
break
fi
if ! echo "$repos" | jq -e '.[].name' >/dev/null; then
echo "break2"
# all repos have been listed
break
fi
result+="$repos" | jq -r '.[] | select((.name | startswith("app-")) and (.archived == false) and (.private == false)) | .name'
echo "$repos" | jq -r '.[] | select((.name | startswith("app-")) and (.archived == false) and (.private == false)) | .name'
echo "pouet"
# Ajouter les noms des dépôts à la liste result
for repo in $(echo "$repos" | jq -r '.[] | select((.name | startswith("app-")) and (.archived == false) and (.private == false)) | .name'); do
result+=("$repo")
Expand All @@ -51,3 +42,23 @@ jobs:
echo "$repo"
done
for repo in "${result[@]}"; do
if curl -s "https://raw.githubusercontent.com/LedgerHQ/$repo/develop/ledger_app.toml" >/dev/null; then
echo "$repo contains ledger_app.toml"
# Récupérer les attributs du fichier toml
toml_content=$(curl -s "https://raw.githubusercontent.com/LedgerHQ/$repo/develop/ledger_app.toml")
build_directory=$(echo "$toml_content" | grep -oP 'build_directory\s*=\s*"\K[^"]+')
sdk=$(echo "$toml_content" | grep -oP 'sdk\s*=\s*"\K[^"]+')
devices=$(echo "$toml_content" | grep -oP 'devices\s*=\s*\[\s*"\K[^"]+(?="\s*\])')
# Afficher les attributs
echo "build_directory: $build_directory"
echo "sdk: $sdk"
echo "devices: $devices"
break
else
echo "$repo does not contain ledger_app.toml"
fi
done

0 comments on commit 880d260

Please sign in to comment.