Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
userdocs committed Feb 20, 2024
1 parent bca195d commit 4315409
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 12 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/matrix_multi_build_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- qbt_build_tool: ""
qbt_qt_version_name: "qt5-"
qbt_qt_version: "5"

- qbt_build_tool: "cmake"
qbt_qt_version_name: ""
qbt_qt_version: "6"
Expand Down Expand Up @@ -224,25 +223,32 @@ jobs:
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 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)"
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
[[ -f "${dependency_version_files}" ]] && dependency_version+=("${dependency_version_files}")
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
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
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/matrix_multi_build_and_release_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
- qbt_build_tool: ""
qbt_qt_version_name: "qt5-"
qbt_qt_version: "5"

- qbt_build_tool: "cmake"
qbt_qt_version_name: ""
qbt_qt_version: "6"
Expand Down Expand Up @@ -288,25 +287,32 @@ jobs:
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 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)"
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
[[ -f "${dependency_version_files}" ]] && dependency_version+=("${dependency_version_files}")
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
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
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ jobs:
- qbt_build_tool: "cmake"
qbt_qt_version_name: ""
qbt_qt_version: "6"
# qbt_qt_tag: "v6.7.0-beta1"

qbt_qt_tag: "v6.7.0-beta3"
- qbt_libtorrent_version: "2.0"
qbt_libtorrent_tag: "RC_2_0"

- qbt_libtorrent_version: "1.2"
qbt_libtorrent_tag: "RC_1_2"

Expand Down Expand Up @@ -233,25 +231,32 @@ jobs:
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 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)"
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
[[ -f "${dependency_version_files}" ]] && dependency_version+=("${dependency_version_files}")
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
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
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- qbt_build_tool: ""
qbt_qt_version_name: "qt5-"
qbt_qt_version: "5"

- qbt_build_tool: "cmake"
qbt_qt_version_name: ""
qbt_qt_version: "6"
Expand Down Expand Up @@ -224,25 +223,32 @@ jobs:
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 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)"
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
[[ -f "${dependency_version_files}" ]] && dependency_version+=("${dependency_version_files}")
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
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
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ jobs:
- qbt_build_tool: ""
qbt_qt_version_name: "qt5-"
qbt_qt_version: "5"

- qbt_build_tool: "cmake"
qbt_qt_version_name: ""
qbt_qt_version: "6"
Expand Down Expand Up @@ -224,25 +223,32 @@ jobs:
for release in 1\.2/*-release.md; do
[[ -f "${release}" ]] && release+=("${release}")
done
revision="$(jq -r .revision 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)"
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
[[ -f "${dependency_version_files}" ]] && dependency_version+=("${dependency_version_files}")
if [[ -f "${dependency_version_files}" ]]; then
sed -r 's/"revision": (.*)/PLACEHOLDER/g' -i "${dependency_version_files}"
dependency_version+=("${dependency_version_files}")
fi
done
readarray -t dependency_version_sorted < <(printf '%s\n' "${dependency_version[@]}" | sort)
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
./pandoc --wrap=preserve -f gfm tmp-release.md -t gfm -o release.md
- name: Host - Bootstrap release tag ${{ github.event.inputs.distinct_id }}
Expand Down

0 comments on commit 4315409

Please sign in to comment.