Skip to content

Commit

Permalink
Update matrix_multi_build_and_release_qbt_workflow_files.yml
Browse files Browse the repository at this point in the history
workflows

if libtorrent RC_1_2 is not updated to work with boost 1.87.0 i'll need to have unique versions of boost per release. this change anticipates that outcome.

Update matrix_multi_build_and_release_qbt_workflow_files.yml
  • Loading branch information
userdocs committed Dec 5, 2024
1 parent 469bad0 commit 4211d6b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,20 +238,23 @@ jobs:
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 1\.2/*-dependency-version.json | head -n1)"
boost="$(jq -r .boost 1\.2/*-dependency-version.json | head -n1)"
fi
if [[ ${{ matrix.qbt_libtorrent_version }} == "2.0" ]]; then
for release in 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 2\.0/*-dependency-version.json | head -n1)"
boost="$(jq -r .boost 2\.0/*-dependency-version.json | head -n1)"
fi
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
for dependency_version_files in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
sed -r 's/"boost": (.*)/BOOST_PLACEHOLDER/g' -i "${dependency_version_files}"
sed -r 's/"revision": (.*)/REVISION_PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
Expand All @@ -261,7 +264,8 @@ jobs:
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
sed -i "s|PLACEHOLDER|\"revision\": \"${revision}\"|" dependency-version.json
sed -i "s|BOOST_PLACEHOLDER|\"boost\": \"${boost}\"|" dependency-version.json
sed -i "s|REVISION_PLACEHOLDER|\"revision\": \"${revision}\"|" dependency-version.json
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
- qbt_build_tool: ""
qbt_qt_version_name: ""
qbt_qt_version: "6"
- qbt_libtorrent_version: 1.2
qbt_boost_tag: boost-1.86.0

name: "${{ matrix.qbt_cross_name }}-${{ matrix.qbt_qt_version_name }}libtorrent-v${{ matrix.qbt_libtorrent_version }}"

Expand Down Expand Up @@ -76,7 +78,7 @@ jobs:
printf '%s\n' "qbt_cross_name=${{ matrix.qbt_cross_name }}" >> env.custom
printf '%s\n' "qbt_patches_url=${{ github.repository }}" >> env.custom
printf '%s\n' "qbt_skip_icu=yes" >> env.custom
printf '%s\n' "qbt_boost_tag=" >> env.custom
printf '%s\n' "qbt_boost_tag=${{ matrix.qbt_boost_tag }}" >> env.custom
printf '%s\n' "qbt_libtorrent_tag=" >> env.custom
printf '%s\n' "qbt_qt_tag=" >> env.custom
printf '%s\n' "qbt_qbittorrent_tag=" >> env.custom
Expand All @@ -87,7 +89,7 @@ jobs:
printf '%s\n' "qbt_optimise_strip=yes" >> env.custom
printf '%s\n' "qbt_build_debug=no" >> env.custom
printf '%s\n' "qbt_revision_url=${{ github.repository }}" >> env.custom
printf '%s\n' "qbt_standard=17" >> env.custom
printf '%s\n' "qbt_standard=" >> env.custom
printf '%s\n' "qbt_static_ish=no" >> env.custom
- name: Host - Create docker multiarch container ${{ github.event.inputs.distinct_id }}
Expand Down Expand Up @@ -230,20 +232,23 @@ jobs:
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 1\.2/*-dependency-version.json | head -n1)"
boost="$(jq -r .boost 1\.2/*-dependency-version.json | head -n1)"
fi
if [[ ${{ matrix.qbt_libtorrent_version }} == "2.0" ]]; then
for release in 2\.0/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 2\.0/*-dependency-version.json | head -n1)"
boost="$(jq -r .boost 2\.0/*-dependency-version.json | head -n1)"
fi
readarray -t release_sorted < <(printf '%s\n' "${release[@]}" | sort)
for dependency_version_files in 1\.2/*-dependency-version.json 2\.0/*-dependency-version.json; do
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
sed -r 's/"boost": (.*)/BOOST_PLACEHOLDER/g' -i "${dependency_version_files}"
sed -r 's/"revision": (.*)/REVISION_PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
Expand All @@ -253,7 +258,8 @@ jobs:
paste -d '\n' "${release_sorted[@]}" | uniq | awk '!(NF && seen[$0]++) || /^>/' > "tmp-release.md"
paste -d '\n' "${dependency_version_sorted[@]}" | uniq | awk '!(NF && seen[$0]++)' > "dependency-version.json"
sed -i "s|PLACEHOLDER|\"revision\": \"${revision}\"|" dependency-version.json
sed -i "s|BOOST_PLACEHOLDER|\"boost\": \"${boost}\"|" dependency-version.json
sed -i "s|REVISION_PLACEHOLDER|\"revision\": \"${revision}\"|" dependency-version.json
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
Expand Down

0 comments on commit 4211d6b

Please sign in to comment.