Skip to content

Commit 70e7d48

Browse files
committed
symlink
1 parent bbdc14e commit 70e7d48

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

config/.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../clients/algoliasearch-client-java/.java-version

scripts/ci/githubActions/createMatrix.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createClientName, exists, GENERATORS, LANGUAGES, toAbsolutePath } from
66
import { getClientsConfigField, getLanguageFolder, getTestExtension, getTestOutputFolder } from '../../config.ts';
77

88
import type { ClientMatrix, CreateMatrix, ToRunMatrix } from './types.ts';
9-
import { COMMON_DEPENDENCIES, DEPENDENCIES, isBaseChanged } from './utils.ts';
9+
import { COMMON_DEPENDENCIES, DEPENDENCIES, getVersionFileForLanguage, isBaseChanged } from './utils.ts';
1010

1111
// This empty matrix is required by the CI, otherwise it throws
1212
const EMPTY_MATRIX = { client: ['no-run'] };
@@ -66,11 +66,7 @@ async function createClientMatrix(baseBranch: string): Promise<void> {
6666

6767
const testsRootFolder = `tests/output/${language}`;
6868
const testsOutputBase = `${testsRootFolder}/${getTestOutputFolder(language)}`;
69-
const versionFile = toAbsolutePath(
70-
language === 'javascript'
71-
? '.nvmrc'
72-
: `config/.${language === 'kotlin' || language === 'scala' ? 'java' : language}-version`,
73-
);
69+
const versionFile = toAbsolutePath(getVersionFileForLanguage(language));
7470
let version: string | undefined = undefined;
7571
if (await exists(versionFile)) {
7672
version = (await fsp.readFile(versionFile)).toString();

scripts/ci/githubActions/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ export const DEPENDENCIES = {
6262
WEBSITE_CHANGED: ['website', 'scripts/website', 'package.json', 'netlify.toml'],
6363
};
6464

65-
function getVersionFileForLanguage(lang: Language): string {
65+
export function getVersionFileForLanguage(lang: Language): string {
6666
// js rely on the nvmrc of the repo
6767
if (lang === 'javascript') {
6868
return '.nvmrc';
6969
}
7070

7171
// jvm lang rely on the same java version
7272
if (lang === 'kotlin' || lang === 'java' || lang === 'scala') {
73-
return 'clients/algoliasearch-client-java/.java-version';
73+
return 'config/.java-version';
7474
}
7575

7676
return `config/.${lang}-version`;

0 commit comments

Comments
 (0)