Skip to content

Commit 09ddb0f

Browse files
committed
Publish script: generate the file for arduinojson.org
1 parent f02a699 commit 09ddb0f

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

extras/scripts/get-release-page.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
set -eu
4+
5+
TAG="$1"
6+
CHANGELOG="$2"
7+
FRONTMATTER="$3"
8+
9+
cat << END
10+
---
11+
branch: v6
12+
version: $TAG
13+
date: '$(date +'%Y-%m-%d')'
14+
$(cat "$FRONTMATTER")
15+
---
16+
17+
$(awk '/\* /{ FOUND=1; print; next } { if (FOUND) exit}' "$CHANGELOG")
18+
END

extras/scripts/publish.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ push
6262
extras/scripts/build-arduino-package.sh . "../ArduinoJson-$TAG.zip"
6363
extras/scripts/build-single-header.sh "src/ArduinoJson.h" "../ArduinoJson-$TAG.h"
6464
extras/scripts/build-single-header.sh "src/ArduinoJson.hpp" "../ArduinoJson-$TAG.hpp"
65-
extras/scripts/wandbox/publish.sh "../ArduinoJson-$TAG.h"
65+
extras/scripts/wandbox/publish.sh "../ArduinoJson-$TAG.h" > "../ArduinoJson-$TAG-wandbox.txt"
66+
extras/scripts/get-release-page.sh "$TAG" "CHANGELOG.md" "../ArduinoJson-$TAG-wandbox.txt" > "../ArduinoJson-$TAG.md"
67+
68+
echo "You can now copy ../ArduinoJson-$TAG.md into arduinojson.org/collections/_versions/$VERSION.md"

0 commit comments

Comments
 (0)