Publish script: generate the file for arduinojson.org

This commit is contained in:
Benoit Blanchon
2021-07-19 09:58:01 +02:00
parent f02a699c26
commit 09ddb0f824
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
set -eu
TAG="$1"
CHANGELOG="$2"
FRONTMATTER="$3"
cat << END
---
branch: v6
version: $TAG
date: '$(date +'%Y-%m-%d')'
$(cat "$FRONTMATTER")
---
$(awk '/\* /{ FOUND=1; print; next } { if (FOUND) exit}' "$CHANGELOG")
END

View File

@ -62,4 +62,7 @@ push
extras/scripts/build-arduino-package.sh . "../ArduinoJson-$TAG.zip"
extras/scripts/build-single-header.sh "src/ArduinoJson.h" "../ArduinoJson-$TAG.h"
extras/scripts/build-single-header.sh "src/ArduinoJson.hpp" "../ArduinoJson-$TAG.hpp"
extras/scripts/wandbox/publish.sh "../ArduinoJson-$TAG.h"
extras/scripts/wandbox/publish.sh "../ArduinoJson-$TAG.h" > "../ArduinoJson-$TAG-wandbox.txt"
extras/scripts/get-release-page.sh "$TAG" "CHANGELOG.md" "../ArduinoJson-$TAG-wandbox.txt" > "../ArduinoJson-$TAG.md"
echo "You can now copy ../ArduinoJson-$TAG.md into arduinojson.org/collections/_versions/$VERSION.md"