8000 Updated publish script for the "ardu-badge" · java64/ArduinoJson@5f72c68 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f72c68

Browse files
committed
Updated publish script for the "ardu-badge"
1 parent b184af6 commit 5f72c68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/publish.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ cd "$(dirname "$0")/.."
77
VERSION="$1"
88
DATE=$(date +%F)
99
TAG="v$VERSION"
10+
VERSION_REGEX="[0-9a-z\\.\\-]+"
1011

1112
update_version_in_source () {
1213
IFS=".-" read MAJOR MINOR REVISION EXTRA < <(echo "$VERSION")
1314
UNDERLINE=$(printf -- '-%.0s' $(seq 1 ${#TAG}))
1415

16+
sed -i~ -bE "s/version=$VERSION_REGEX/version=$VERSION/; s|ardu-badge.com/ArduinoJson/$VERSION_REGEX|ardu-badge.com/ArduinoJson/$VERSION|; " README.md
17+
rm README.md*~
18+
1519
sed -i~ -bE "4s/HEAD/$TAG ($DATE)/; 5s/-+/$UNDERLINE/" CHANGELOG.md
1620
rm CHANGELOG.md*~
1721
sed -i~ -bE "s/\"version\":.*$/\"version\": \"$VERSION\",/" library.json

0 commit comments

Comments
 (0)
0