Skip to content

Commit

Permalink
Get release notes from applicable release branch
Browse files Browse the repository at this point in the history
Closes #411
  • Loading branch information
stianst committed Sep 12, 2023
1 parent 92b9ad1 commit 9a6613d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@

public class ReleaseNotesBuilder extends AbstractBuilder {

private static final String BASE_URL = "https://raw.githubusercontent.com/keycloak/keycloak/main/docs/documentation/";
private static final String DOCUMENT_ATTRIBUTES_URL = BASE_URL + "topics/templates/document-attributes.adoc";
// private static final String BASE_URL = "https://raw.githubusercontent.com/keycloak/keycloak/main/docs/documentation/";
private static final String DOCUMENT_ATTRIBUTES_URL = "https://raw.githubusercontent.com/keycloak/keycloak/main/docs/documentation/topics/templates/document-attributes.adoc";

private static final String RELEASE_NOTES_URL = "https://raw.githubusercontent.com/keycloak/keycloak/release/%s/docs/documentation/release_notes/topics/%s.adoc";

@Override
protected String getTitle() {
Expand All @@ -32,7 +34,8 @@ public void build() throws IOException {

for (Versions.Version v : context.versions()) {
try {
URL url = new URL(BASE_URL + "release_notes/topics/" + v.getVersion().replace(".", "_") + ".adoc");
String releaseNotesUrl = String.format(RELEASE_NOTES_URL, v.getVersionShorter(), v.getVersion().replace(".", "_"));
URL url = new URL(releaseNotesUrl);

String fileName = "release-notes-" + v.getVersion().replace(".", "_") + ".html";

Expand Down

0 comments on commit 9a6613d

Please sign in to comment.