Do leave artifact in the build directory when using start-keycloak
This commit is contained in:
@ -113,6 +113,10 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
|
|
||||||
const keycloakMajorVersionNumber = SemVer.parse(keycloakVersion).major;
|
const keycloakMajorVersionNumber = SemVer.parse(keycloakVersion).major;
|
||||||
|
|
||||||
|
const beforeBuildJarFileBasenames = fs
|
||||||
|
.readdirSync(buildContext.keycloakifyBuildDirPath)
|
||||||
|
.filter(fileBasename => fileBasename.endsWith(".jar"));
|
||||||
|
|
||||||
{
|
{
|
||||||
const { isAppBuildSuccess } = await appBuild({
|
const { isAppBuildSuccess } = await appBuild({
|
||||||
buildContext
|
buildContext
|
||||||
@ -266,7 +270,13 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
|
|||||||
pathBasename(jarFilePath)
|
pathBasename(jarFilePath)
|
||||||
);
|
);
|
||||||
|
|
||||||
fs.copyFileSync(jarFilePath, jarFilePath_cacheDir);
|
{
|
||||||
|
const fsFnName = beforeBuildJarFileBasenames.includes(pathBasename(jarFilePath))
|
||||||
|
? "copyFileSync"
|
||||||
|
: "renameSync";
|
||||||
|
|
||||||
|
fs[fsFnName](jarFilePath, jarFilePath_cacheDir);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
child_process.execSync(`docker rm --force ${containerName}`, {
|
child_process.execSync(`docker rm --force ${containerName}`, {
|
||||||
|
Reference in New Issue
Block a user