Include the number of GitHub stars in the library description.

This commit is contained in:
Benoit Blanchon
2024-01-10 18:11:43 +01:00
parent a7bfc2212c
commit 5dfa25d3dc
4 changed files with 16 additions and 6 deletions

View File

@ -15,6 +15,7 @@ VERSION="$1"
DATE=$(date +%F) DATE=$(date +%F)
TAG="v$VERSION" TAG="v$VERSION"
VERSION_REGEX='[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?' VERSION_REGEX='[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'
STARS=$(curl -s https://api.github.com/repos/bblanchon/ArduinoJson | jq '.stargazers_count')
update_version_in_source () { update_version_in_source () {
IFS=".-" read MAJOR MINOR REVISION EXTRA < <(echo "$VERSION") IFS=".-" read MAJOR MINOR REVISION EXTRA < <(echo "$VERSION")
@ -29,16 +30,25 @@ update_version_in_source () {
sed -i~ -bE "s/(project\\s*\\(ArduinoJson\\s+VERSION\\s+).*?\\)/\\1$MAJOR.$MINOR.$REVISION)/" CMakeLists.txt sed -i~ -bE "s/(project\\s*\\(ArduinoJson\\s+VERSION\\s+).*?\\)/\\1$MAJOR.$MINOR.$REVISION)/" CMakeLists.txt
rm CMakeLists.txt~ rm CMakeLists.txt~
sed -i~ -bE "s/\"version\":.*$/\"version\": \"$VERSION\",/" library.json sed -i~ -bE \
-e "s/\"version\":.*$/\"version\": \"$VERSION\",/" \
-e "s/[0-9]+ stars/$STARS stars/" \
library.json
rm library.json~ rm library.json~
sed -i~ -bE "s/version=.*$/version=$VERSION/" library.properties sed -i~ -bE \
-e "s/version=.*$/version=$VERSION/" \
-e "s/[0-9]+ stars/$STARS stars/" \
library.properties
rm library.properties~ rm library.properties~
sed -i~ -bE "s/version: .*$/version: $VERSION.{build}/" appveyor.yml sed -i~ -bE "s/version: .*$/version: $VERSION.{build}/" appveyor.yml
rm appveyor.yml~ rm appveyor.yml~
sed -i~ -bE "s/^version: .*$/version: \"$VERSION\"/" idf_component.yml sed -i~ -bE \
-e "s/^version: .*$/version: \"$VERSION\"/" \
-e "s/[0-9]+ stars/$STARS stars/" \
idf_component.yml
rm idf_component.yml~ rm idf_component.yml~
sed -i~ -bE \ sed -i~ -bE \

View File

@ -2,7 +2,7 @@ version: "7.0.0"
description: >- description: >-
A simple and efficient JSON library for embedded C++. A simple and efficient JSON library for embedded C++.
ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more. ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more.
It is the most popular Arduino library on GitHub ❤❤❤❤❤. ⭐ 6430 stars on GitHub.
Check out arduinojson.org for a comprehensive documentation. Check out arduinojson.org for a comprehensive documentation.
url: https://arduinojson.org/ url: https://arduinojson.org/
files: files:

View File

@ -1,7 +1,7 @@
{ {
"name": "ArduinoJson", "name": "ArduinoJson",
"keywords": "json, rest, http, web", "keywords": "json, rest, http, web",
"description": "A simple and efficient JSON library for embedded C++. ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation.", "description": "A simple and efficient JSON library for embedded C++. ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more. ⭐ 6430 stars on GitHub. Check out arduinojson.org for a comprehensive documentation.",
"homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json", "homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -3,7 +3,7 @@ version=7.0.0
author=Benoit Blanchon <blog.benoitblanchon.fr> author=Benoit Blanchon <blog.benoitblanchon.fr>
maintainer=Benoit Blanchon <blog.benoitblanchon.fr> maintainer=Benoit Blanchon <blog.benoitblanchon.fr>
sentence=A simple and efficient JSON library for embedded C++. sentence=A simple and efficient JSON library for embedded C++.
paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation. paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ streams, ✔ filtering, and more. ⭐ 6430 stars on GitHub. Check out arduinojson.org for a comprehensive documentation.
category=Data Processing category=Data Processing
url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties
architectures=* architectures=*