Fix printf flag parsing in version bump workflow (#28)

This commit is contained in:
Adam Moussa 2026-05-01 14:53:47 -04:00 • committed by GitHub
parent f92f2ed72e
commit 7116458efb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -99,7 +99,14 @@ jobs:
CANVAS_BULLETS: ${{ steps.changes.outputs.canvas_bullets }}
run: |
TODAY=$(TZ=America/New_York date +%Y-%m-%d)
MARKDOWN=$(printf "---\n\n## %s — %s\n\n%s" "$VERSION" "$TODAY" "$CANVAS_BULLETS")
read -r -d '' MARKDOWN <<ENDMD || true
---
## ${VERSION} — ${TODAY}
${CANVAS_BULLETS}
ENDMD
MARKDOWN=$(echo "$MARKDOWN" | sed 's/^ //')
RESPONSE=$(curl -s -X POST https://slack.com/api/canvases.edit \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
@ -135,8 +142,15 @@ jobs:
SLACK_BULLETS: ${{ steps.changes.outputs.slack_bullets }}
run: |
CANVAS_URL="https://app.slack.com/docs/F0B13V3EBUN"
TEXT=$(printf "*After-Hours Scheduler has been updated to %s*\n\nHere's a brief summary of what changed:\n%s\n\n<%s|Click here to read the full changelog>" \
"$VERSION" "$SLACK_BULLETS" "$CANVAS_URL")
read -r -d '' TEXT <<ENDTXT || true
*After-Hours Scheduler has been updated to ${VERSION}*
Here's a brief summary of what changed:
${SLACK_BULLETS}
<${CANVAS_URL}|Click here to read the full changelog>
ENDTXT
TEXT=$(echo "$TEXT" | sed 's/^ //')
curl -s -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \