diff --git a/clients/algoliasearch-client-java/.java-version b/clients/algoliasearch-client-java/.java-version index 10cf4953b5b..d79aa6586ce 100644 --- a/clients/algoliasearch-client-java/.java-version +++ b/clients/algoliasearch-client-java/.java-version @@ -1 +1 @@ -21.0.6+7.0.LTS +21.0.6 diff --git a/config/.java-version b/config/.java-version deleted file mode 100644 index 95f8a283f00..00000000000 --- a/config/.java-version +++ /dev/null @@ -1 +0,0 @@ -22.0.2 diff --git a/config/.java-version b/config/.java-version new file mode 120000 index 00000000000..52983950c13 --- /dev/null +++ b/config/.java-version @@ -0,0 +1 @@ +../clients/algoliasearch-client-java/.java-version \ No newline at end of file diff --git a/scripts/ci/githubActions/createMatrix.ts b/scripts/ci/githubActions/createMatrix.ts index 9a3fa569352..f54b6afc640 100644 --- a/scripts/ci/githubActions/createMatrix.ts +++ b/scripts/ci/githubActions/createMatrix.ts @@ -6,7 +6,7 @@ import { createClientName, exists, GENERATORS, LANGUAGES, toAbsolutePath } from import { getClientsConfigField, getLanguageFolder, getTestExtension, getTestOutputFolder } from '../../config.ts'; import type { ClientMatrix, CreateMatrix, ToRunMatrix } from './types.ts'; -import { COMMON_DEPENDENCIES, DEPENDENCIES, isBaseChanged } from './utils.ts'; +import { COMMON_DEPENDENCIES, DEPENDENCIES, getVersionFileForLanguage, isBaseChanged } from './utils.ts'; // This empty matrix is required by the CI, otherwise it throws const EMPTY_MATRIX = { client: ['no-run'] }; @@ -66,11 +66,7 @@ async function createClientMatrix(baseBranch: string): Promise { const testsRootFolder = `tests/output/${language}`; const testsOutputBase = `${testsRootFolder}/${getTestOutputFolder(language)}`; - const versionFile = toAbsolutePath( - language === 'javascript' - ? '.nvmrc' - : `config/.${language === 'kotlin' || language === 'scala' ? 'java' : language}-version`, - ); + const versionFile = toAbsolutePath(getVersionFileForLanguage(language)); let version: string | undefined = undefined; if (await exists(versionFile)) { version = (await fsp.readFile(versionFile)).toString(); diff --git a/scripts/ci/githubActions/utils.ts b/scripts/ci/githubActions/utils.ts index 8912ee592fe..79801a50a52 100644 --- a/scripts/ci/githubActions/utils.ts +++ b/scripts/ci/githubActions/utils.ts @@ -62,7 +62,7 @@ export const DEPENDENCIES = { WEBSITE_CHANGED: ['website', 'scripts/website', 'package.json', 'netlify.toml'], }; -function getVersionFileForLanguage(lang: Language): string { +export function getVersionFileForLanguage(lang: Language): string { // js rely on the nvmrc of the repo if (lang === 'javascript') { return '.nvmrc';