Generate a README alongside the jars to indicate why there's two jar file

This commit is contained in:
Joseph Garrone 2023-12-04 14:10:10 +01:00
parent 5e4a829413
commit 635207d12c

View File

@ -65,9 +65,21 @@ export async function main() {
if (buildOptions.doCreateJar) { if (buildOptions.doCreateJar) {
child_process.execSync("mvn clean install", { "cwd": buildOptions.keycloakifyBuildDirPath }); child_process.execSync("mvn clean install", { "cwd": buildOptions.keycloakifyBuildDirPath });
fs.renameSync( const jarDirPath = pathDirname(jarFilePath);
pathJoin(pathDirname(jarFilePath), "original-" + pathBasename(jarFilePath)), const retrocompatJarFilePath = pathJoin(jarDirPath, "retrocompat-" + pathBasename(jarFilePath));
pathJoin(pathDirname(jarFilePath), "retrocompat-" + pathBasename(jarFilePath))
fs.renameSync(pathJoin(jarDirPath, "original-" + pathBasename(jarFilePath)), retrocompatJarFilePath);
fs.writeFileSync(
pathJoin(jarDirPath, "README.md"),
Buffer.from(
[
`- The ${jarFilePath} is to be used in Keycloak 23 and up. `,
`- The ${retrocompatJarFilePath} is to be used in Keycloak 21 and below.`,
` Note that Keycloak 22 is only supported for login and email theme but not for account themes. `
].join("\n"),
"utf8"
)
); );
} }