Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
113 changes: 33 additions & 80 deletions .github/scripts/generate-prerelease-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,28 @@ fi
RAW_NAME=${EXTENSION_ID#vscode-}
PREFIX_NAME=$(echo "$RAW_NAME" | awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1' FS="-" OFS=" ")

# Function to determine the date of the previous change we should consider
# Function to determine the date of the previous major/minor release
get_last_update_date() {
local date_changelog=""
local date_tag=""
local final_date=""

# 1. Find the last commit that modified the CHANGELOG_FILE with a commit message starting with "Update pre-release changelog"
date_changelog=$(git log -1 --grep="^Update pre-release changelog" --format="%aI" -- "$CHANGELOG_FILE")

# 2. Find the latest git tag that starts with the extension ID
local latest_tag=$(git tag -l "${EXTENSION_ID}-*" --sort=-v:refname | head -n 1)
# 1. Find the latest git tag that starts with the extension ID (skipping non-zero patch versions)
local latest_tag=$(git tag -l "${EXTENSION_ID}-*" --sort=-v:refname | grep -E "^${EXTENSION_ID}-[0-9]+\.[0-9]+\.0(-|$)" | head -n 1)
if [ -n "$latest_tag" ]; then
date_tag=$(git log -1 --format="%aI" "$latest_tag")
fi

# 3. If both are present, use the later of the dates
if [ -n "$date_changelog" ] && [ -n "$date_tag" ]; then
# Use node to compare ISO 8601 dates reliably across platforms
local later_date=$(node -e "console.log(new Date('$date_changelog') > new Date('$date_tag') ? '$date_changelog' : '$date_tag')")
final_date="$later_date"
elif [ -n "$date_changelog" ]; then
final_date="$date_changelog"
elif [ -n "$date_tag" ]; then
final_date="$date_tag"
fi

if [ -n "$final_date" ]; then
echo "$final_date"
git log -1 --format="%aI" "$latest_tag"
return
fi

# 4. If there are no dates, use VSCode Marketplace
# 2. If no tag, use VSCode Marketplace
local publisher=$(jq -r '.publisher' "$PACKAGE_JSON")
if [ -n "$publisher" ] && [ "$publisher" != "null" ]; then
echo "Querying VSCode Marketplace for the last non-prerelease version of ${publisher}.${EXTENSION_ID}..." >&2
local date_marketplace=$(npx --yes @vscode/vsce show "${publisher}.${EXTENSION_ID}" --json 2>/dev/null | jq -r '[.versions[] | select(.properties == null or all(.properties[]; .key != "Microsoft.VisualStudio.Code.PreRelease" or .value != "true"))] | .[0] | .lastUpdated')
local date_marketplace=$(npx --yes @vscode/vsce show "${publisher}.${EXTENSION_ID}" --json 2>/dev/null | jq -r '[.versions[] | select((.properties == null or all(.properties[]; .key != "Microsoft.VisualStudio.Code.PreRelease" or .value != "true")) and (.version | test("^[0-9]+\\.[0-9]+\\.0$")))] | .[0] | .lastUpdated')

if [ -n "$date_marketplace" ] && [ "$date_marketplace" != "null" ]; then
echo "$date_marketplace"
return
fi
fi

# 5. Still no dates? Keep date blank
# 3. Still no dates? Keep date blank
echo ""
}

Expand Down Expand Up @@ -98,73 +76,48 @@ update_changelog() {
local formatted_issues="$1"
local version=$(jq -r '.version' "$PACKAGE_JSON")
local current_date=$(date +"%Y-%m-%d")
local header="## $current_date ($version PRE-RELEASE)"
local new_header="## $current_date ($version PRE-RELEASE)"

local temp_file=$(mktemp)

# Check if the exact header already exists in the file
if grep -q "^$header$" "$CHANGELOG_FILE"; then
echo "Pre-release section for $current_date ($version PRE-RELEASE) already exists. Prepending new issues." >&2

# Find the line number of the header
local header_line=$(grep -n "^$header$" "$CHANGELOG_FILE" | cut -d: -f1)

# Find the line number of the "#### all fixes and improvements in detail" that comes after the header
local details_offset=$(tail -n +$header_line "$CHANGELOG_FILE" | grep -n "^#### all fixes and improvements in detail$" | head -n 1 | cut -d: -f1)

if [ -n "$details_offset" ]; then
local insert_line=$((header_line + details_offset))

# Copy everything up to the insert line
head -n "$insert_line" "$CHANGELOG_FILE" > "$temp_file"
echo "" >> "$temp_file"
# Insert the new issues
echo "$formatted_issues" >> "$temp_file"

# Copy the rest of the file, skipping the blank line immediately following if it exists
tail -n +$((insert_line + 1)) "$CHANGELOG_FILE" | awk 'NR==1 && /^$/ {next} {print}' >> "$temp_file"
else
# Fallback if "#### all fixes and improvements in detail" is missing under the header
head -n "$header_line" "$CHANGELOG_FILE" > "$temp_file"
echo "" >> "$temp_file"
echo "#### all fixes and improvements in detail" >> "$temp_file"
echo "" >> "$temp_file"
echo "$formatted_issues" >> "$temp_file"
echo "" >> "$temp_file"
tail -n +$((header_line + 1)) "$CHANGELOG_FILE" >> "$temp_file"
fi
# Check if a header for this pre-release version already exists (ignoring the exact date)
local existing_header=$(grep -E "^## .* \($version PRE-RELEASE\)$" "$CHANGELOG_FILE" | head -n 1)

if [ -n "$existing_header" ]; then
echo "Pre-release section for $version already exists. Overwriting issues." >&2
local header_line=$(grep -n -F "$existing_header" "$CHANGELOG_FILE" | cut -d: -f1)
local next_header_offset=$(tail -n +$((header_line + 1)) "$CHANGELOG_FILE" | grep -n "^## " | head -n 1 | cut -d: -f1)

# Deduplicate issues in the section we just modified
local next_header_offset=$(tail -n +$((header_line + 1)) "$temp_file" | grep -n "^## " | head -n 1 | cut -d: -f1)
local end_line

if [ -n "$next_header_offset" ]; then
end_line=$((header_line + next_header_offset - 1))
else
end_line=$(wc -l < "$temp_file")
end_line=$(wc -l < "$CHANGELOG_FILE")
fi

local dedup_temp=$(mktemp)

# 1. Copy everything before the issues section
head -n "$insert_line" "$temp_file" > "$dedup_temp"
echo "" >> "$dedup_temp"
# Copy everything before the header
if [ "$header_line" -gt 1 ]; then
head -n $((header_line - 1)) "$CHANGELOG_FILE" > "$temp_file"
else
> "$temp_file"
fi

# 2. Extract, deduplicate, and append the issues section
sed -n "$((insert_line + 1)),${end_line}p" "$temp_file" | awk '!seen[$0]++' | grep -v "^$" >> "$dedup_temp"
echo "" >> "$dedup_temp"
# Insert the new header (with current date) and issues
echo "$new_header" >> "$temp_file"
echo "" >> "$temp_file"
echo "#### all fixes and improvements in detail" >> "$temp_file"
echo "" >> "$temp_file"
echo "$formatted_issues" >> "$temp_file"
echo "" >> "$temp_file"

# 3. Copy everything after the issues section
# Copy everything after the old section
if [ -n "$next_header_offset" ]; then
tail -n +$((end_line + 1)) "$temp_file" >> "$dedup_temp"
tail -n +$((end_line + 1)) "$CHANGELOG_FILE" >> "$temp_file"
fi

mv "$dedup_temp" "$temp_file"

else
echo "Creating new pre-release section for $current_date ($version PRE-RELEASE)." >&2
# Prepend the new header and the formatted list of issues to CHANGELOG.md
echo "$header" > "$temp_file"
echo "$new_header" > "$temp_file"
echo "" >> "$temp_file"
echo "#### all fixes and improvements in detail" >> "$temp_file"
echo "" >> "$temp_file"
Expand All @@ -187,4 +140,4 @@ if [ -z "$FORMATTED_ISSUES" ]; then
exit 0
fi

update_changelog "$FORMATTED_ISSUES"
update_changelog "$FORMATTED_ISSUES"
12 changes: 10 additions & 2 deletions .github/workflows/publish-vscode-extension-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,21 @@ jobs:
# Retry loop for git push to handle parallel workflow conflicts
max_retries=5
retry_count=0

# Get current branch name
CURRENT_BRANCH=$(git branch --show-current)
if [ -z "$CURRENT_BRANCH" ]; then
# If in detached HEAD (like actions/checkout often is), we push to the ref that triggered the workflow
CURRENT_BRANCH=${GITHUB_REF#refs/heads/}
fi

while [ $retry_count -lt $max_retries ]; do
if git push; then
if git push origin HEAD:$CURRENT_BRANCH; then
echo "Successfully pushed changelog updates."
break
else
echo "Push failed, attempting to pull and rebase (attempt $((retry_count + 1)) of $max_retries)..."
git pull --rebase origin main
git pull --rebase origin $CURRENT_BRANCH
retry_count=$((retry_count + 1))
# Add a small random sleep to prevent perfectly synced retries
sleep $((RANDOM % 5 + 1))
Expand Down
57 changes: 57 additions & 0 deletions vscode-extensions/vscode-spring-boot/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,66 @@
* _(Spring Boot)_ "Internal error" logged by Spring Boot Language Server [#1886](https://github.com/spring-projects/spring-tools/issues/1886)
* _(Spring Boot)_ [API Versioning] Spring Language Server Doesn't Recognise useVersionResolver() use for API Versioning [#1880](https://github.com/spring-projects/spring-tools/issues/1880)
* _(Spring Boot)_ [aot repositories] align position of code lens with method declaration or annotation, not above the javadoc [#1874](https://github.com/spring-projects/spring-tools/issues/1874)
* _(Spring Boot)_ allow validation preferences to include parameter values for the validation [#1869](https://github.com/spring-projects/spring-tools/issues/1869)
* _(Spring Boot)_ [cleanup] remove outdated vscode ai agent definitions and code from extension [#1868](https://github.com/spring-projects/spring-tools/issues/1868)
* _(Spring Boot)_ Use JDT Refactoring instead OpenRewrite recipe for AOT generated query [#1865](https://github.com/spring-projects/spring-tools/issues/1865)
* _(Spring Boot)_ [type-safe property references] deal with multiple references at once [#1860](https://github.com/spring-projects/spring-tools/issues/1860)
* _(Spring Boot)_ [spring ai] add overall support for Spring AI [#1857](https://github.com/spring-projects/spring-tools/issues/1857)
* _(Spring Boot)_ improve spring data query symbol label for multi-line text-block queries [#1856](https://github.com/spring-projects/spring-tools/issues/1856)
* _(Spring Boot)_ NPE thrown inside of updated indexer logic [#1855](https://github.com/spring-projects/spring-tools/issues/1855)
* _(Spring Boot)_ Native query validation defaults to PostgreSQL when MariaDB and H2 driver in class path [#1839](https://github.com/spring-projects/spring-tools/issues/1839)
* _(Spring Boot)_ [spring indexer] remove deprecated symbol indexing [#1836](https://github.com/spring-projects/spring-tools/issues/1836)
* _(Spring Boot)_ AOT Query escape chars [#1833](https://github.com/spring-projects/spring-tools/issues/1833)
* _(Spring Boot)_ Spring Boot Tools [#1831](https://github.com/spring-projects/spring-tools/issues/1831)
* _(Spring Boot)_ auto completion of bean names for `@DependsOn` annotation is broken [#1829](https://github.com/spring-projects/spring-tools/issues/1829)
* _(Spring Boot)_ [type-safe property references] support refactoring string-based to type-safe property references [#1827](https://github.com/spring-projects/spring-tools/issues/1827)
* _(Spring Boot)_ additional Spring indexer refactorings [#1825](https://github.com/spring-projects/spring-tools/issues/1825)
* _(Spring Boot)_ improve JDK 25 AOT cache usage [#1824](https://github.com/spring-projects/spring-tools/issues/1824)
* _(Spring Boot)_ [structure view] sorting of projects get out of sync when projects arrive async [#1821](https://github.com/spring-projects/spring-tools/issues/1821)
* _(Spring Boot)_ revalidation of OpenFeign config clients does not work all the time [#1804](https://github.com/spring-projects/spring-tools/issues/1804)
* _(Spring Boot)_ [structure view] initial delay when opening the view [#1690](https://github.com/spring-projects/spring-tools/issues/1690)
* _(Spring Boot)_ [validation] more false positives for missing configuration validation [#1292](https://github.com/spring-projects/spring-tools/issues/1292)
* _(Spring Boot)_ Support `@ConfigurationProperties` on bean method for `application.properties` references [#1256](https://github.com/spring-projects/spring-tools/issues/1256)
* _(Spring Boot)_ couldn't create connection to server [#1167](https://github.com/spring-projects/spring-tools/issues/1167)
* _(Spring Boot)_ Only shows when springboot app runs [#1136](https://github.com/spring-projects/spring-tools/issues/1136)
* _(Spring Boot)_ CorruptZip: end of central directory record signature not found [#1102](https://github.com/spring-projects/spring-tools/issues/1102)

## 2026-05-12 (2.2.0 PRE-RELEASE)

#### all fixes and improvements in detail

* _(Spring Boot)_ "Internal error" logged by Spring Boot Language Server [#1886](https://github.com/spring-projects/spring-tools/issues/1886)
* _(Spring Boot)_ [API Versioning] Spring Language Server Doesn't Recognise useVersionResolver() use for API Versioning [#1880](https://github.com/spring-projects/spring-tools/issues/1880)
* _(Spring Boot)_ [aot repositories] align position of code lens with method declaration or annotation, not above the javadoc [#1874](https://github.com/spring-projects/spring-tools/issues/1874)
<<<<<<< HEAD
* _(Spring Boot)_ [spring ai] add overall support for Spring AI [#1857](https://github.com/spring-projects/spring-tools/issues/1857)
* _(Spring Boot)_ revalidation of OpenFeign config clients does not work all the time [#1804](https://github.com/spring-projects/spring-tools/issues/1804)
* _(Spring Boot)_ [validation] more false positives for missing configuration validation [#1292](https://github.com/spring-projects/spring-tools/issues/1292)
=======
* _(Spring Boot)_ allow validation preferences to include parameter values for the validation [#1869](https://github.com/spring-projects/spring-tools/issues/1869)
* _(Spring Boot)_ [cleanup] remove outdated vscode ai agent definitions and code from extension [#1868](https://github.com/spring-projects/spring-tools/issues/1868)
* _(Spring Boot)_ Use JDT Refactoring instead OpenRewrite recipe for AOT generated query [#1865](https://github.com/spring-projects/spring-tools/issues/1865)
* _(Spring Boot)_ [type-safe property references] deal with multiple references at once [#1860](https://github.com/spring-projects/spring-tools/issues/1860)
* _(Spring Boot)_ [spring ai] add overall support for Spring AI [#1857](https://github.com/spring-projects/spring-tools/issues/1857)
* _(Spring Boot)_ improve spring data query symbol label for multi-line text-block queries [#1856](https://github.com/spring-projects/spring-tools/issues/1856)
* _(Spring Boot)_ NPE thrown inside of updated indexer logic [#1855](https://github.com/spring-projects/spring-tools/issues/1855)
* _(Spring Boot)_ Native query validation defaults to PostgreSQL when MariaDB and H2 driver in class path [#1839](https://github.com/spring-projects/spring-tools/issues/1839)
* _(Spring Boot)_ [spring indexer] remove deprecated symbol indexing [#1836](https://github.com/spring-projects/spring-tools/issues/1836)
* _(Spring Boot)_ AOT Query escape chars [#1833](https://github.com/spring-projects/spring-tools/issues/1833)
* _(Spring Boot)_ Spring Boot Tools [#1831](https://github.com/spring-projects/spring-tools/issues/1831)
* _(Spring Boot)_ auto completion of bean names for `@DependsOn` annotation is broken [#1829](https://github.com/spring-projects/spring-tools/issues/1829)
* _(Spring Boot)_ [type-safe property references] support refactoring string-based to type-safe property references [#1827](https://github.com/spring-projects/spring-tools/issues/1827)
* _(Spring Boot)_ additional Spring indexer refactorings [#1825](https://github.com/spring-projects/spring-tools/issues/1825)
* _(Spring Boot)_ improve JDK 25 AOT cache usage [#1824](https://github.com/spring-projects/spring-tools/issues/1824)
* _(Spring Boot)_ [structure view] sorting of projects get out of sync when projects arrive async [#1821](https://github.com/spring-projects/spring-tools/issues/1821)
* _(Spring Boot)_ revalidation of OpenFeign config clients does not work all the time [#1804](https://github.com/spring-projects/spring-tools/issues/1804)
* _(Spring Boot)_ [structure view] initial delay when opening the view [#1690](https://github.com/spring-projects/spring-tools/issues/1690)
* _(Spring Boot)_ [validation] more false positives for missing configuration validation [#1292](https://github.com/spring-projects/spring-tools/issues/1292)
* _(Spring Boot)_ Support `@ConfigurationProperties` on bean method for `application.properties` references [#1256](https://github.com/spring-projects/spring-tools/issues/1256)
* _(Spring Boot)_ couldn't create connection to server [#1167](https://github.com/spring-projects/spring-tools/issues/1167)
* _(Spring Boot)_ Only shows when springboot app runs [#1136](https://github.com/spring-projects/spring-tools/issues/1136)
* _(Spring Boot)_ CorruptZip: end of central directory record signature not found [#1102](https://github.com/spring-projects/spring-tools/issues/1102)
>>>>>>> c9436c4ea (Rework)

## 2026-03-18 (5.1.1 RELEASE, incl. language servers version 2.1.1)

Expand Down
Loading