Skip to content

Commit

Permalink
Pull release notes from keycloak-client repository
Browse files Browse the repository at this point in the history
Closes #547

Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Jan 22, 2025
1 parent 9080596 commit 43eeb55
Show file tree
Hide file tree
Showing 176 changed files with 484 additions and 46 deletions.
30 changes: 30 additions & 0 deletions add-version-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash -e

VERSION=$1
if [ "$VERSION" == "" ]; then
echo "usage: add-version-client.sh VERSION"
exit 1
fi

VERSION_NAME=`echo $VERSION | sed 's/.Final//' | sed 's/.CR[[:digit:]]//'`
DATE=`date +%F`

if [[ "$VERSION" == *".0" ]]; then
TEMPLATE="version-template.json"
else
TEMPLATE="versions/keycloak-client/${VERSION%.*}.0.json"
fi

if [ ! -f "$TEMPLATE" ]; then
echo "$TEMPLATE not found"
exit
fi

cat $TEMPLATE | sed "s/\"version\":.*/\"version\": \"$VERSION\",/" | sed 's/"date": ".*"/"date": "DATE"/' | sed "s/DATE/$DATE/" > versions/keycloak-client/$VERSION_NAME.json

CURRENT=`cat pom.xml | grep '<version.keycloak.client>' | cut -d '>' -f 2 | cut -d '<' -f 1`
LATEST=`echo -e "$CURRENT\n$VERSION" | sort -V -r | head -n 1`

sed -i "s|<version.keycloak.client>$CURRENT</version.keycloak.client>|<version.keycloak.client>$LATEST</version.keycloak.client>|g" pom.xml

mvn install
6 changes: 3 additions & 3 deletions add-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ fi
VERSION_NAME=`echo $VERSION | sed 's/.Final//' | sed 's/.CR[[:digit:]]//'`
DATE=`date +%F`

if [[ "$VERSION" == *".0" ]]; then
if [[ "$VERSION" == *".0" ]]; then
TEMPLATE="version-template.json"
else
TEMPLATE="versions/${VERSION%.*}.0.json"
TEMPLATE="versions/keycloak/{VERSION%.*}.0.json"
fi

if [ ! -f "$TEMPLATE" ]; then
echo "$TEMPLATE not found"
exit
fi

cat $TEMPLATE | sed "s/\"version\":.*/\"version\": \"$VERSION\",/" | sed 's/"date": ".*"/"date": "DATE"/' | sed "s/DATE/$DATE/" > versions/$VERSION_NAME.json
cat $TEMPLATE | sed "s/\"version\":.*/\"version\": \"$VERSION\",/" | sed 's/"date": ".*"/"date": "DATE"/' | sed "s/DATE/$DATE/" > versions/keycloak/$VERSION_NAME.json

CURRENT=`cat pom.xml | grep '<version.keycloak>' | cut -d '>' -f 2 | cut -d '<' -f 1`
LATEST=`echo -e "$CURRENT\n$VERSION" | sort -V -r | head -n 1`
Expand Down
15 changes: 15 additions & 0 deletions cache/releases/keycloak-client/26.0.1/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[ {
"number" : 89,
"repository" : "keycloak-client",
"title" : "ClientTest failing with latest Keycloak nightly",
"kind" : "bug",
"area" : "admin-client",
"url" : "https://github.com/keycloak/keycloak-client/issues/89"
}, {
"number" : 92,
"repository" : "keycloak-client",
"title" : "Setup CI during nightly build",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/92"
} ]
20 changes: 20 additions & 0 deletions cache/releases/keycloak-client/26.0.1/gh-release-notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div>

<h2>Upgrading</h2>
<p>Before upgrading refer to <a href="https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes">the migration guide</a> for a complete list of changes.</p>

<h2>All resolved issues</h2>



<h3>Enhancements</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/92">#92</a> Setup CI during nightly build <code>client</code></li>
</ul>

<h3>Bugs</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/89">#89</a> ClientTest failing with latest Keycloak nightly <code>client</code></li>
</ul>

</div>
File renamed without changes.
22 changes: 22 additions & 0 deletions cache/releases/keycloak-client/26.0.2/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[ {
"number" : 92,
"repository" : "keycloak-client",
"title" : "Setup CI during nightly build",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/92"
}, {
"number" : 94,
"repository" : "keycloak-client",
"title" : "Tests failing with latest Keycloak server nightly",
"kind" : "bug",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/94"
}, {
"number" : 99,
"repository" : "keycloak-client",
"title" : "Sync with keycloak server 26.0.4",
"kind" : "enhancement",
"area" : "admin-client",
"url" : "https://github.com/keycloak/keycloak-client/issues/99"
} ]
21 changes: 21 additions & 0 deletions cache/releases/keycloak-client/26.0.2/gh-release-notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<div>

<h2>Upgrading</h2>
<p>Before upgrading refer to <a href="https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes">the migration guide</a> for a complete list of changes.</p>

<h2>All resolved issues</h2>



<h3>Enhancements</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/92">#92</a> Setup CI during nightly build <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/99">#99</a> Sync with keycloak server 26.0.4 <code>client</code></li>
</ul>

<h3>Bugs</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/94">#94</a> Tests failing with latest Keycloak server nightly <code>client</code></li>
</ul>

</div>
File renamed without changes.
36 changes: 36 additions & 0 deletions cache/releases/keycloak-client/26.0.3/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[ {
"number" : 87,
"repository" : "keycloak-client",
"title" : "Setup nightly action to sync from keycloak server main",
"kind" : "task",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/87"
}, {
"number" : 90,
"repository" : "keycloak-client",
"title" : "Update MD files ",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/90"
}, {
"number" : 93,
"repository" : "keycloak-client",
"title" : "Move upgrading guide for keycloak-client libraries to the client documentation",
"kind" : "enhancement",
"area" : "docs",
"url" : "https://github.com/keycloak/keycloak-client/issues/93"
}, {
"number" : 101,
"repository" : "keycloak-client",
"title" : "Setup GH action (or script), which will send PR for automatically sync with keycloak server",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/101"
}, {
"number" : 105,
"repository" : "keycloak-client",
"title" : "Unnecessary `httpclient` dependency in `keycloak-client-common-synced` module",
"kind" : "bug",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/105"
} ]
22 changes: 22 additions & 0 deletions cache/releases/keycloak-client/26.0.3/gh-release-notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<div>

<h2>Upgrading</h2>
<p>Before upgrading refer to <a href="https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes">the migration guide</a> for a complete list of changes.</p>

<h2>All resolved issues</h2>



<h3>Enhancements</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/90">#90</a> Update MD files <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/93">#93</a> Move upgrading guide for keycloak-client libraries to the client documentation <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/101">#101</a> Setup GH action (or script), which will send PR for automatically sync with keycloak server <code>client</code></li>
</ul>

<h3>Bugs</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/105">#105</a> Unnecessary `httpclient` dependency in `keycloak-client-common-synced` module <code>client</code></li>
</ul>

</div>
File renamed without changes.
43 changes: 43 additions & 0 deletions cache/releases/keycloak-client/26.0.4/changelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[ {
"number" : 115,
"repository" : "keycloak-client",
"title" : "ProviderTest failing with latest nightly build",
"kind" : "bug",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/115"
}, {
"number" : 117,
"repository" : "keycloak-client",
"title" : "Remove JEE from the title of GH actions",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/117"
}, {
"number" : 124,
"repository" : "keycloak-client",
"title" : "The action \"Sync with Keycloak Server and send PR with changes\" sends PR, which does not have DCO on the commit",
"kind" : "bug",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/124"
}, {
"number" : 127,
"repository" : "keycloak-client",
"title" : "Sync after Keycloak server 26.1.0 release",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/127"
}, {
"number" : 129,
"repository" : "keycloak-client",
"title" : "The action \"Sync with Keycloak Server and send PR with changes\" takes only client-common-synced into consideration",
"kind" : "bug",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/129"
}, {
"number" : 130,
"repository" : "keycloak-client",
"title" : "Test with keycloak server images 24.0, 26.0 and 26.1",
"kind" : "enhancement",
"area" : null,
"url" : "https://github.com/keycloak/keycloak-client/issues/130"
} ]
24 changes: 24 additions & 0 deletions cache/releases/keycloak-client/26.0.4/gh-release-notes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div>

<h2>Upgrading</h2>
<p>Before upgrading refer to <a href="https://www.keycloak.org/docs/latest/upgrading/index.html#migration-changes">the migration guide</a> for a complete list of changes.</p>

<h2>All resolved issues</h2>



<h3>Enhancements</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/117">#117</a> Remove JEE from the title of GH actions <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/127">#127</a> Sync after Keycloak server 26.1.0 release <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/130">#130</a> Test with keycloak server images 24.0, 26.0 and 26.1 <code>client</code></li>
</ul>

<h3>Bugs</h3>
<ul>
<li><a href="https://github.com/keycloak/keycloak-client/issues/115">#115</a> ProviderTest failing with latest nightly build <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/124">#124</a> The action "Sync with Keycloak Server and send PR with changes" sends PR, which does not have DCO on the commit <code>client</code></li>
<li><a href="https://github.com/keycloak/keycloak-client/issues/129">#129</a> The action "Sync with Keycloak Server and send PR with changes" takes only client-common-synced into consideration <code>client</code></li>
</ul>

</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sources:
- id: keycloak
repo: keycloak/keycloak
githubReleaseFrom: 23.0.0
releaseNotes: release/${version.getVersionShorter()}/docs/documentation/release_notes/topics/${version.getVersion()?replace(".", "_")}.adoc
attributeSources:
- release/${version.getVersionShorter()}/docs/documentation/topics/templates/document-attributes.adoc
- ${version.getVersion()}/docs/documentation/topics/templates/document-attributes.adoc
- id: keycloak-client
repo: keycloak/keycloak-client
githubReleaseFrom: 26.0.1
releaseNotes: main/docs/release-notes/${version.getVersion()?replace(".", "_")}.adoc
36 changes: 32 additions & 4 deletions src/main/java/org/keycloak/webbuilder/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.keycloak.webbuilder.utils.YamlParser;

import java.io.File;
import java.util.LinkedList;

public class Context {

Expand All @@ -16,6 +17,8 @@ public class Context {
private final File resourcesDir;
private final File staticDir;
private final File versionsDir;
private final File keycloakVersionsDir;
private final File keycloakClientVersionsDir;
private final File extensionsDir;
private final File newsDir;
private final File blogDir;
Expand All @@ -25,11 +28,13 @@ public class Context {
private final File cacheDir;

private Config config;
private Versions versions;
private Versions keycloakVersions;
private Versions keycloakClientVersions;
private Extensions extensions;
private Blogs blogs;
private Guides guides;
private GuidesMetadata guidesMetadata;
private ReleasesMetadata releasesMetadata;
private News news;

private FreeMarker freeMarker;
Expand All @@ -45,6 +50,8 @@ public Context(File rootDir) throws Exception {
resourcesDir = new File(webSrcDir, "resources");
staticDir = new File(webSrcDir, "static");
versionsDir = new File(webSrcDir, "versions");
keycloakVersionsDir = new File(versionsDir, "keycloak");
keycloakClientVersionsDir = new File(versionsDir, "keycloak-client");
extensionsDir = new File(webSrcDir, "extensions");
newsDir = new File(webSrcDir, "news");
blogDir = new File(webSrcDir, "blog");
Expand All @@ -60,10 +67,12 @@ public void init() throws Exception {
config = loadConfig();
links = new Links(config);

versions = new Versions(versionsDir);
keycloakVersions = new Versions(keycloakVersionsDir);
keycloakClientVersions = new Versions(keycloakClientVersionsDir);
extensions = new Extensions(extensionsDir);
blogs = new Blogs(blogDir, versions, config, freeMarker, asciiDoctor);
blogs = new Blogs(blogDir, keycloakVersions, config, freeMarker, asciiDoctor);
guidesMetadata = new YamlParser().read(new File(getWebSrcDir(),"/guides.yaml"), GuidesMetadata.class);
releasesMetadata = new YamlParser().read(new File(getWebSrcDir(),"/releases.yaml"), ReleasesMetadata.class);
guides = new Guides(guidesMetadata, tmpDir, getWebSrcDir(), asciiDoctor);
news = new News(newsDir, blogs, config);

Expand Down Expand Up @@ -92,7 +101,22 @@ public Config config() {
}

public Versions versions() {
return versions;
return keycloakVersions;
}

public LinkedList<Versions.Version> versionsFor(String id) throws Exception {
switch (id) {
case "keycloak":
return versions();
case "keycloak-client":
return clientVersions();
default:
throw new Exception(String.format("No versions available for %s", id));
}
}

public Versions clientVersions() {
return keycloakClientVersions;
}

public Extensions extensions() {
Expand Down Expand Up @@ -159,6 +183,10 @@ public GuidesMetadata getGuidesMetadata() {
return guidesMetadata;
}

public ReleasesMetadata getReleasesMetadata() {
return releasesMetadata;
}

public File getGuidesDir() {
return guidesDir;
}
Expand Down
Loading

0 comments on commit 43eeb55

Please sign in to comment.