Skip to content

Commit d4918f0

Browse files
committed
fix
1 parent 6564ddc commit d4918f0

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
- name: Compute specs matrix
6969
id: spec-matrix
7070
shell: bash
71-
run: yarn workspace scripts createMatrix ${{ steps.diff.outputs.ORIGIN_BRANCH }} && sleep 1
71+
run: yarn workspace scripts createMatrix ${{ steps.diff.outputs.ORIGIN_BRANCH }}
7272

7373
- name: Compute the client codegen matrix
7474
id: gen-matrix

scripts/ci/githubActions/setRunVariables.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
/* eslint-disable no-console */
22
import * as core from '@actions/core';
33

4-
import type { Language } from '../../types.js';
5-
64
import { DEPENDENCIES, isBaseChanged } from './utils.js';
75

8-
export function getVersionFileForLanguage(lang: Language): string {
9-
// js rely on the nvmrc of the repo
10-
if (lang === 'javascript') {
11-
return '.nvmrc';
12-
}
13-
14-
// jvm lang rely on the same java version
15-
if (lang === 'kotlin' || lang === 'java' || lang === 'scala') {
16-
return 'config/.java-version';
17-
}
18-
19-
return `config/.${lang}-version`;
20-
}
21-
226
/**
237
* Outputs variables used in the CI to determine if a job should run.
248
*/

scripts/ci/githubActions/utils.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import * as core from '@actions/core';
33

44
import { LANGUAGES } from '../../common.js';
55
import { getLanguageFolder } from '../../config.js';
6+
import type { Language } from '../../types.js';
67
import { getNbGitDiff } from '../utils.js';
78

8-
import { getVersionFileForLanguage } from './setRunVariables.js';
9-
109
export const COMMON_DEPENDENCIES = {
1110
GITHUB_ACTIONS_CHANGED: ['.github/actions', '.github/workflows'],
1211
SCRIPTS_CHANGED: [
@@ -57,6 +56,20 @@ export const DEPENDENCIES = LANGUAGES.reduce(
5756
{ ...COMMON_DEPENDENCIES } as Record<string, string[]>,
5857
);
5958

59+
export function getVersionFileForLanguage(lang: Language): string {
60+
// js rely on the nvmrc of the repo
61+
if (lang === 'javascript') {
62+
return '.nvmrc';
63+
}
64+
65+
// jvm lang rely on the same java version
66+
if (lang === 'kotlin' || lang === 'java' || lang === 'scala') {
67+
return 'config/.java-version';
68+
}
69+
70+
return `config/.${lang}-version`;
71+
}
72+
6073
/**
6174
* Determines if changes have been found in the `dependencies`, compared to the `baseBranch`.
6275
*

scripts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"build": "yarn build:cli & yarn build:actions",
77
"build:actions": "cd ci/actions/restore-artifacts && esbuild --bundle --format=esm --sourcemap --minify --platform=node --outdir=builddir --log-level=error src/index.ts",
8-
"build:cli": "esbuild --bundle --format=esm --minify --sourcemap --platform=node --packages=external --outdir=dist --log-level=error cli/index.ts ci/codegen/*.ts ci/githubActions/*.ts",
8+
"build:cli": "esbuild --bundle --format=esm --sourcemap --platform=node --packages=external --outdir=dist --log-level=error cli/index.ts ci/codegen/*.ts ci/githubActions/*.ts",
99
"createMatrix": "yarn runScript dist/ci/githubActions/createMatrix.js",
1010
"lint": "eslint --ext=ts,js,mjs,cjs .",
1111
"lint:deadcode": "knip",

0 commit comments

Comments
 (0)