Skip to content

Fix corrupted dependency versions caused by release workflow sed patterns#92

Merged
brunoborges merged 2 commits intomainfrom
copilot/fix-jbang-example-dependency-version
Apr 23, 2026
Merged

Fix corrupted dependency versions caused by release workflow sed patterns#92
brunoborges merged 2 commits intomainfrom
copilot/fix-jbang-example-dependency-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Resolves #80


Before the change?

  • The release workflow's sed patterns only matched -java.N version qualifiers (e.g., 0.2.2-java.1), not -java-preview.N (e.g., 0.3.0-java-preview.0). When updating versions, sed matched only the base 0.3.0 portion, producing corrupted versions like 0.3.0-java-preview.1-java-preview.0 across jbang-example.java, README.md, and all cookbook markdown files.
  • The version validation regex and tag filter regex similarly rejected -java-preview.N format.

After the change?

  • All corrupted version strings fixed to 0.3.0-java-preview.1 across 8 files (jbang-example.java, README.md, 5 cookbook files)
  • README.md Maven section updated from stale 0.3.0-java-preview.0 to 0.3.0-java-preview.1
  • Release workflow sed patterns updated from \(-java\.[0-9][0-9]*\) to \(-java\(-preview\)\{0,1\}\.[0-9][0-9]*\) — now matches all three formats: M.M.P, M.M.P-java.N, M.M.P-java-preview.N
  • Version validation and tag filter regexes updated to accept -java-preview.N

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • mvn spotless:apply has been run to format the code
  • mvn clean verify passes locally

Does this introduce a breaking change?

  • Yes
  • No

…java-preview.N format

Agent-Logs-Url: https://github.com/github/copilot-sdk-java/sessions/f0073ec1-6192-4879-953c-26576dbb61b6

Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix jbang-example.java with wrong dependency version Fix corrupted dependency versions caused by release workflow sed patterns Apr 23, 2026
Copilot AI requested a review from brunoborges April 23, 2026 21:14
@brunoborges brunoborges marked this pull request as ready for review April 23, 2026 21:16
Copilot AI review requested due to automatic review settings April 23, 2026 21:16
Copy link
Copy Markdown
Collaborator

@brunoborges brunoborges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the release workflow’s version-matching logic so it correctly handles -java-preview.N qualifiers, and repairs documentation/examples that were previously corrupted by incomplete sed patterns. This aligns the Java SDK release automation with the project’s supported version formats while keeping docs and examples consistent for users.

Changes:

  • Correct corrupted copilot-sdk-java version strings in README, JBang example, and cookbook pages.
  • Update .github/workflows/publish-maven.yml regexes to accept and rewrite M.M.P-java-preview.N versions (validation, tag filtering, and doc update sed patterns).
  • Refresh README Maven/Gradle snippets to the intended released version (0.3.0-java-preview.1).
Show a summary per file
File Description
.github/workflows/publish-maven.yml Expands version validation/tag filtering and doc-update sed patterns to support -java-preview.N without corrupting strings.
README.md Fixes Maven/Gradle dependency examples to a non-corrupted, current preview version.
jbang-example.java Fixes the //DEPS coordinate to the intended preview version.
src/site/markdown/cookbook/pr-visualization.md Fixes corrupted //DEPS version in the example.
src/site/markdown/cookbook/persisting-sessions.md Fixes corrupted //DEPS versions across multiple code blocks.
src/site/markdown/cookbook/multiple-sessions.md Fixes corrupted //DEPS versions in the examples.
src/site/markdown/cookbook/managing-local-files.md Fixes corrupted //DEPS versions across code blocks.
src/site/markdown/cookbook/error-handling.md Fixes corrupted //DEPS versions across all example sections.

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 0

@brunoborges brunoborges merged commit 0924df6 into main Apr 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: jbang-example.java with wrong dependency version

4 participants