File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
src/scripts/crowdin/translations Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -44,17 +44,16 @@ jobs:
44
44
# Build translations
45
45
- name : Build Crowdin project
46
46
id : build-crowdin
47
- run : npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/triggerBuild.ts
48
-
49
- - name : Load buildId
50
- run : echo "BUILD_ID=$(cat output.env | grep buildId | cut -d'=' -f2)" >> $GITHUB_ENV
47
+ run : |
48
+ npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/triggerBuild.ts;
49
+ grep BUILD_ID output.env >> $GITHUB_ENV;
51
50
52
51
- name : Await latest build to finish
53
52
run : npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/awaitLatestBuild.ts
54
53
55
54
- name : Check build success
56
55
run : |
57
- if [ " $(grep BUILD_SUCCESS output.env | cut -d'=' -f2)" = " false" ]; then
56
+ if [ $(grep BUILD_SUCCESS output.env | cut -d'=' -f2) = false ]; then
58
57
echo "Build timed out, exiting"
59
58
exit 1
60
59
fi
Original file line number Diff line number Diff line change 1
- import { resolve } from "path"
1
+ import { join } from "path"
2
2
3
3
export const DOT_CROWDIN = ".crowdin"
4
4
5
5
export const CROWDIN_DATA_DIR = "src/data/crowdin"
6
6
export const SAVE_FILE = "download.zip"
7
- export const FILE_PATH = resolve ( CROWDIN_DATA_DIR , SAVE_FILE )
7
+ export const FILE_PATH = join ( CROWDIN_DATA_DIR , SAVE_FILE )
8
8
9
9
export const SUMMARY_SAVE_FILE = "import-summary.json"
10
- export const SUMMARY_PATH = resolve ( CROWDIN_DATA_DIR , SUMMARY_SAVE_FILE )
10
+ export const SUMMARY_PATH = join ( CROWDIN_DATA_DIR , SUMMARY_SAVE_FILE )
11
11
12
12
export const BUCKETS_IMPORTED_FILE = "buckets-imported.json"
13
- export const BUCKETS_PATH = resolve ( CROWDIN_DATA_DIR , BUCKETS_IMPORTED_FILE )
13
+ export const BUCKETS_PATH = join ( CROWDIN_DATA_DIR , BUCKETS_IMPORTED_FILE )
14
14
15
15
export const APPROVAL_THRESHOLD = 100
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ async function triggerBuild() {
16
16
`Build ${ isAlreadyFinished ? "already finished" : "triggered" } id:` ,
17
17
id
18
18
)
19
- writeFileSync ( OUTPUT_PATH , `buildId =${ id } \n` , { flag : "a" } )
19
+ writeFileSync ( OUTPUT_PATH , `BUILD_ID =${ id } \n` , { flag : "a" } )
20
20
} catch ( error : unknown ) {
21
21
console . error ( ( error as Error ) . message )
22
22
}
You can’t perform that action at this time.
0 commit comments