Skip to content

Commit a22d019

Browse files
committed
script to update versions
1 parent 36f7507 commit a22d019

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

scripts/update-versions.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
VERSION_STR="$1"
4+
NEW_VERSION=$(echo "$VERSION_STR" | cut -d. -f2)
5+
OLD_VERSION=$((NEW_VERSION - 1))
6+
NEXT_VERSION=$((NEW_VERSION + 1))
7+
8+
FILES=(
9+
"website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html"
10+
"website_and_docs/layouts/downloads/list.html"
11+
"examples/java/build.gradle"
12+
"examples/dotnet/SeleniumDocs/SeleniumDocs.csproj"
13+
"examples/python/requirements.txt"
14+
"examples/kotlin/pom.xml"
15+
"examples/java/pom.xml"
16+
"examples/javascript/package.json"
17+
"examples/ruby/Gemfile"
18+
)
19+
20+
for FILE_PATH in "${FILES[@]}"; do
21+
if [[ "$FILE_PATH" == "examples/ruby/Gemfile" ]]; then
22+
sed -i '' -E "s/4\.$NEW_VERSION\.0/4.$NEXT_VERSION.0/g" "$FILE_PATH"
23+
fi
24+
25+
sed -i '' -E "s/4\.$OLD_VERSION\.[0-9]+/4.$NEW_VERSION.0/g" "$FILE_PATH"
26+
done
27+
28+
pushd examples/ruby
29+
bundle install
30+
popd
31+
32+
pushd examples/javascript
33+
npm install
34+
popd

0 commit comments

Comments
 (0)