Update version target range
This commit is contained in:
parent
3d1d2e316b
commit
39ad1eb8d1
@ -75,9 +75,9 @@ export function getKeycloakVersionRangeForJar(params: {
|
||||
}
|
||||
switch (keycloakThemeAdditionalInfoExtensionVersion) {
|
||||
case null:
|
||||
return "21-and-below";
|
||||
return "all-other-versions";
|
||||
case "1.1.5":
|
||||
return "22-and-above";
|
||||
return "22-to-25";
|
||||
}
|
||||
assert<Equals<typeof keycloakThemeAdditionalInfoExtensionVersion, never>>(
|
||||
false
|
||||
|
@ -3,7 +3,7 @@ export type KeycloakVersionRange =
|
||||
| KeycloakVersionRange.WithoutAccountV1Theme;
|
||||
|
||||
export namespace KeycloakVersionRange {
|
||||
export type WithoutAccountV1Theme = "21-and-below" | "22-and-above";
|
||||
export type WithoutAccountV1Theme = "22-to-25" | "all-other-versions";
|
||||
|
||||
export type WithAccountV1Theme = "21-and-below" | "23" | "24" | "25-and-above";
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import { type ThemeType } from "./constants";
|
||||
import { id } from "tsafe/id";
|
||||
import chalk from "chalk";
|
||||
import { getProxyFetchOptions, type ProxyFetchOptions } from "../tools/fetchProxyOptions";
|
||||
import { is } from "tsafe/is";
|
||||
|
||||
export type BuildContext = {
|
||||
themeVersion: string;
|
||||
@ -297,8 +298,8 @@ export function getBuildContext(params: {
|
||||
]),
|
||||
keycloakVersionTargets: z
|
||||
.object({
|
||||
"21-and-below": z.union([z.boolean(), z.string()]),
|
||||
"22-and-above": z.union([z.boolean(), z.string()])
|
||||
"22-to-25": z.union([z.boolean(), z.string()]),
|
||||
"all-other-versions": z.union([z.boolean(), z.string()])
|
||||
})
|
||||
.optional()
|
||||
});
|
||||
@ -779,11 +780,14 @@ export function getBuildContext(params: {
|
||||
return keycloakVersionRange;
|
||||
} else {
|
||||
const keycloakVersionRange = (() => {
|
||||
if (buildForKeycloakMajorVersionNumber <= 21) {
|
||||
return "21-and-below" as const;
|
||||
if (
|
||||
buildForKeycloakMajorVersionNumber <= 21 ||
|
||||
buildForKeycloakMajorVersionNumber >= 26
|
||||
) {
|
||||
return "all-other-versions" as const;
|
||||
}
|
||||
|
||||
return "22-and-above" as const;
|
||||
return "22-to-25" as const;
|
||||
})();
|
||||
|
||||
assert<
|
||||
@ -801,6 +805,12 @@ export function getBuildContext(params: {
|
||||
use_custom_jar_basename: {
|
||||
const { keycloakVersionTargets } = buildOptions;
|
||||
|
||||
assert(
|
||||
is<Record<KeycloakVersionRange, string | boolean>>(
|
||||
keycloakVersionTargets
|
||||
)
|
||||
);
|
||||
|
||||
if (keycloakVersionTargets === undefined) {
|
||||
break use_custom_jar_basename;
|
||||
}
|
||||
@ -861,8 +871,8 @@ export function getBuildContext(params: {
|
||||
}
|
||||
} else {
|
||||
for (const keycloakVersionRange of [
|
||||
"21-and-below",
|
||||
"22-and-above"
|
||||
"22-to-25",
|
||||
"all-other-versions"
|
||||
] as const) {
|
||||
assert<
|
||||
Equals<
|
||||
@ -888,7 +898,17 @@ export function getBuildContext(params: {
|
||||
const jarTargets: BuildContext["jarTargets"] = [];
|
||||
|
||||
for (const [keycloakVersionRange, jarNameOrBoolean] of objectEntries(
|
||||
buildOptions.keycloakVersionTargets
|
||||
(() => {
|
||||
const { keycloakVersionTargets } = buildOptions;
|
||||
|
||||
assert(
|
||||
is<Record<KeycloakVersionRange, string | boolean>>(
|
||||
keycloakVersionTargets
|
||||
)
|
||||
);
|
||||
|
||||
return keycloakVersionTargets;
|
||||
})()
|
||||
)) {
|
||||
if (jarNameOrBoolean === false) {
|
||||
continue;
|
||||
|
2400
src/bin/start-keycloak/myrealm-realm-26.json
Normal file
2400
src/bin/start-keycloak/myrealm-realm-26.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user