mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
Include the number of GitHub stars in the library description.
This commit is contained in:
@ -15,6 +15,7 @@ VERSION="$1"
|
||||
DATE=$(date +%F)
|
||||
TAG="v$VERSION"
|
||||
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 () {
|
||||
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
|
||||
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~
|
||||
|
||||
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~
|
||||
|
||||
sed -i~ -bE "s/version: .*$/version: $VERSION.{build}/" 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~
|
||||
|
||||
sed -i~ -bE \
|
||||
|
Reference in New Issue
Block a user