Skip to content

Commit d82d6d0

Browse files
committed
remove verbose commnets
1 parent d203b93 commit d82d6d0

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

scripts/update-release-calendar.sh

+1-16
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,34 @@ set -euo pipefail
88

99
DOCS_FILE="docs/install/releases/index.md"
1010

11-
# Define unique markdown comments as anchors
1211
CALENDAR_START_MARKER="<!-- RELEASE_CALENDAR_START -->"
1312
CALENDAR_END_MARKER="<!-- RELEASE_CALENDAR_END -->"
1413

15-
# Get current date
1614
current_date=$(date +"%Y-%m-%d")
1715
current_month=$(date +"%m")
1816
current_year=$(date +"%Y")
1917

20-
# Function to get the first Tuesday of a given month and year
2118
get_first_tuesday() {
2219
local year=$1
2320
local month=$2
2421
local first_day
2522
local days_until_tuesday
2623
local first_tuesday
2724

28-
# Find the first day of the month
2925
first_day=$(date -d "$year-$month-01" +"%u")
3026

31-
# Calculate days until first Tuesday (if day 1 is Tuesday, first_day=2)
3227
days_until_tuesday=$((first_day == 2 ? 0 : (9 - first_day) % 7))
3328

34-
# Get the date of the first Tuesday
3529
first_tuesday=$(date -d "$year-$month-01 +$days_until_tuesday days" +"%Y-%m-%d")
3630

3731
echo "$first_tuesday"
3832
}
3933

40-
# Function to format date as "Month DD, YYYY"
34+
# Format date as "Month DD, YYYY"
4135
format_date() {
4236
date -d "$1" +"%B %d, %Y"
4337
}
4438

45-
# Function to get the latest patch version for a minor release
4639
get_latest_patch() {
4740
local version_major=$1
4841
local version_minor=$2
@@ -52,19 +45,15 @@ get_latest_patch() {
5245
# Get all tags for this minor version
5346
tags=$(cd "$(git rev-parse --show-toplevel)" && git tag | grep "^v$version_major\\.$version_minor\\." | sort -V)
5447

55-
# Get the latest one
5648
latest=$(echo "$tags" | tail -1)
5749

5850
if [ -z "$latest" ]; then
59-
# If no tags found, return empty
6051
echo ""
6152
else
62-
# Return without the v prefix
6353
echo "${latest#v}"
6454
fi
6555
}
6656

67-
# Function to get the next release month, accounting for skipped January releases
6857
get_next_release_month() {
6958
local current_month=$1
7059
local next_month=$((current_month + 1))
@@ -103,13 +92,9 @@ generate_release_calendar() {
10392
# Start with 3 unsupported releases back
10493
start_minor=$((version_minor - 5))
10594

106-
# Initialize the calendar table with an additional column for latest release
10795
result="| Release name | Release Date | Status | Latest Release |\n"
10896
result+="|--------------|--------------|--------|----------------|\n"
10997

110-
# We know we skip January in our release schedule
111-
# Months when releases happen (Feb-Dec, skip Jan)
112-
11398
# Find the latest release month and year
11499
local current_release_minor=$((version_minor - 1)) # Current stable release
115100
local tag_date

0 commit comments

Comments
 (0)