Prevent the jar to be corrupted when rebuild
This commit is contained in:
parent
5e13b8c41f
commit
81ebb9b552
@ -317,6 +317,10 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
|
|
||||||
await extractThemeResourcesFromJar();
|
await extractThemeResourcesFromJar();
|
||||||
|
|
||||||
|
const jarFilePath_cacheDir = pathJoin(buildContext.cacheDirPath, jarFileBasename);
|
||||||
|
|
||||||
|
fs.copyFileSync(jarFilePath, jarFilePath_cacheDir);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
child_process.execSync(`docker rm --force ${containerName}`, {
|
child_process.execSync(`docker rm --force ${containerName}`, {
|
||||||
stdio: "ignore"
|
stdio: "ignore"
|
||||||
@ -337,7 +341,10 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
"-v",
|
"-v",
|
||||||
`${realmJsonFilePath}:/opt/keycloak/data/import/myrealm-realm.json`
|
`${realmJsonFilePath}:/opt/keycloak/data/import/myrealm-realm.json`
|
||||||
]),
|
]),
|
||||||
...["-v", `${jarFilePath}:/opt/keycloak/providers/keycloak-theme.jar`],
|
...[
|
||||||
|
"-v",
|
||||||
|
`${jarFilePath_cacheDir}:/opt/keycloak/providers/keycloak-theme.jar`
|
||||||
|
],
|
||||||
...(keycloakMajorVersionNumber <= 20
|
...(keycloakMajorVersionNumber <= 20
|
||||||
? ["-e", "JAVA_OPTS=-Dkeycloak.profile=preview"]
|
? ["-e", "JAVA_OPTS=-Dkeycloak.profile=preview"]
|
||||||
: []),
|
: []),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user