mirror of
https://github.com/jhuebert/MeshCore.git
synced 2026-12-03 10:54:13 +00:00
ci: actually summarise the boards a release published
Three defects in one step, found by running its shell against a real manifest: - it globbed out/manifest-*.txt AFTER moving those files to .manifests/, so every release reported that no build manifests were produced - printf "$SUMMARY" treats a leading "-" as an option and exits 2, so the step would have failed outright once the manifests were found - the heading carried literal \n\n text, which glued the first board name onto the heading line in the rendered release body Manifests are read from .manifests/, printed with %b, and the header joins the same expansion. Verified against one build, a partial build and no builds.
This commit is contained in:
1 parent
4b690bbc4f
commit
e600bb9eca
1 file changed
+8
-3
@@ -430,10 +430,11 @@ jobs:
|
||||
# Every build writes a manifest naming its target, the source SHA and
|
||||
# the files it produced. Collecting them here means a dev release that
|
||||
# published only some boards says so, loudly, instead of implying the
|
||||
# whole list was covered.
|
||||
# whole list was covered. They are read from where the previous step
|
||||
# moved them: the asset directory no longer holds them.
|
||||
SUMMARY=""
|
||||
COUNT=0
|
||||
for m in out/manifest-*.txt; do
|
||||
for m in .manifests/manifest-*.txt; do
|
||||
[ -f "$m" ] || continue
|
||||
COUNT=$((COUNT + 1))
|
||||
TARGET=$(sed -n 's/^target: //p' "$m")
|
||||
@@ -442,7 +443,11 @@ jobs:
|
||||
if [ "$COUNT" = 0 ]; then
|
||||
BODY="_No build manifests were produced._"
|
||||
else
|
||||
BODY="### Boards in this release\n\n$(printf "$SUMMARY")"
|
||||
# %b, not the bare format: SUMMARY starts with "-", which printf
|
||||
# would otherwise read as an option and refuse. The header joins the
|
||||
# same expansion, so the list below it is real newlines rather than
|
||||
# literal "\n" text on the heading line.
|
||||
BODY="### Boards in this release$(printf '\n\n%b' "$SUMMARY")"
|
||||
fi
|
||||
{
|
||||
echo "summary<<MANIFEST_EOF"
|
||||
|
||||
Reference in new issue
Block a user