Skip to content

Commit 57d62ef

Browse files
committed
bash
1 parent 1ab3cae commit 57d62ef

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,21 @@ jobs:
215215
- name: Build packages
216216
shell: bash
217217
run: |
218-
./vcpkg x-manifest-tool export-dependencies --format=list > ports.txt
219-
while read p; do
218+
# Extract dependencies from vcpkg.json
219+
if command -v jq &> /dev/null; then
220+
# Use jq if available
221+
jq -r '.dependencies[] | if type == "object" then .name else . end' vcpkg.json > ports.txt
222+
jq -r '(.["overrides"] // [])[] | .name' vcpkg.json >> ports.txt || true
223+
else
224+
# Fallback: parse manually (basic extraction)
225+
grep -oP '"name"\s*:\s*"\K[^"]+' vcpkg.json > ports.txt || \
226+
grep -oP '"\K[a-z0-9-]+(?="\s*[,\]])' vcpkg.json | grep -v "name\|version" > ports.txt
227+
fi
228+
229+
# Install each port one by one
230+
while IFS= read -r p; do
231+
[[ -z "$p" ]] && continue # Skip empty lines
232+
echo "Installing $p..."
220233
./vcpkg install "$p" \
221234
--vcpkg-root="${{ matrix.vcpkg_path }}" \
222235
--feature-flags="-compilertracking,manifests,registries,versions" \

0 commit comments

Comments
 (0)