Skip to content

chore: fix release calendar and script #17745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: remove unused date variables
  • Loading branch information
matifali committed May 9, 2025
commit ad6e1f8617b5a2afb41cf3b4893e64b304e74297
14 changes: 5 additions & 9 deletions scripts/update-release-calendar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ DOCS_FILE="docs/install/releases/index.md"
CALENDAR_START_MARKER="<!-- RELEASE_CALENDAR_START -->"
CALENDAR_END_MARKER="<!-- RELEASE_CALENDAR_END -->"

current_date=$(date +"%Y-%m-%d")
current_month=$(date +"%m")
current_year=$(date +"%Y")

# Format date as "Month DD, YYYY"
format_date() {
date -d "$1" +"%B %d, %Y"
Expand Down Expand Up @@ -64,16 +60,16 @@ get_release_date() {

# Get the first patch release
first_patch=$(get_first_patch "$version_major" "$version_minor")

if [ -z "$first_patch" ]; then
# No release found
echo ""
return
fi

# Get the tag date from git
tag_date=$(cd "$(git rev-parse --show-toplevel)" && git log -1 --format=%ai "v$first_patch" 2>/dev/null || echo "")

if [ -z "$tag_date" ]; then
echo ""
else
Expand Down Expand Up @@ -133,7 +129,7 @@ generate_release_calendar() {
# Get the actual release date from the first published tag
if [[ "$status" != "Not Released" ]]; then
actual_release_date=$(get_release_date "$version_major" "$rel_minor")

# Format the release date if we have one
if [ -n "$actual_release_date" ]; then
formatted_date=$(format_date "$actual_release_date")
Expand Down Expand Up @@ -207,4 +203,4 @@ mv "${DOCS_FILE}.new" "$DOCS_FILE"
# run make fmt/markdown
make fmt/markdown

echo "Successfully updated release calendar in $DOCS_FILE"
echo "Successfully updated release calendar in $DOCS_FILE"
Loading