-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathrelease-updates.sh
More file actions
executable file
·38 lines (29 loc) · 1.71 KB
/
release-updates.sh
File metadata and controls
executable file
·38 lines (29 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
VERSION_STR="$1"
NEW_VERSION=$(echo "$VERSION_STR" | cut -d. -f2)
OLD_VERSION=$((NEW_VERSION - 1))
FILES=(
"website_and_docs/layouts/partials/selenium-clients-and-webdriver-bindings.html"
"website_and_docs/layouts/downloads/list.html"
)
for FILE_PATH in "${FILES[@]}"; do
sed -i '' -E "s/4\.$OLD_VERSION\.[0-9]+/4.$NEW_VERSION.0/g" "$FILE_PATH"
done
OLD_BLOG="website_and_docs/content/blog/2025/selenium-4-$OLD_VERSION-released.md"
NEW_BLOG="website_and_docs/content/blog/2025/selenium-4-$NEW_VERSION-released.md"
cp "$OLD_BLOG" "$NEW_BLOG"
git add "$NEW_BLOG"
sed -i '' "s/4\.$OLD_VERSION/4\.$NEW_VERSION/g" "$NEW_BLOG"
SINCE_COMMIT_DATE=$(gh api repos/seleniumhq/selenium/commits/selenium-4.${OLD_VERSION}.0 --jq '.commit.committer.date')
UNTIL_COMMIT_DATE=$(gh api repos/seleniumhq/selenium/commits/selenium-4.${NEW_VERSION}.0 --jq '.commit.committer.date')
echo "Selenium Contributors"
gh api --method GET /repos/seleniumhq/selenium/commits -f since="$SINCE_COMMIT_DATE" -f until="$UNTIL_COMMIT_DATE" -f per_page=1000 \
--jq 'map(.author.login) | unique | sort | map("{{< gh-user \"https://api.github.com/users/" + . + "\" >}}") | .[]'
echo
echo "Docs Contributors"
gh api --method GET /repos/seleniumhq/seleniumhq.github.io/commits -f since="$SINCE_COMMIT_DATE" -f until="$UNTIL_COMMIT_DATE" -f per_page=1000 \
--jq 'map(.author.login) | unique | sort | map("{{< gh-user \"https://api.github.com/users/" + . + "\" >}}") | .[]'
echo
echo "Docker Contributors"
gh api --method GET /repos/seleniumhq/docker-selenium/commits -f since="$SINCE_COMMIT_DATE" -f until="$UNTIL_COMMIT_DATE" -f per_page=1000 \
--jq 'map(.author.login) | unique | sort | map("{{< gh-user \"https://api.github.com/users/" + . + "\" >}}") | .[]'