Skip to content

Commit

Permalink
tools: move icu-data clone to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
98lenvi committed Jul 26, 2022
1 parent 1008f88 commit d3cfda9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
with:
fetch-depth: '0'
persist-credentials: false
- uses: actions/checkout@v3
with:
name: 'unicode-org/icu-data'
ref: refs/heads/release
- run: tools/update-timezone.mjs # Run the timezone tool
- uses: gr2m/create-or-update-pull-request-action@6720400cad8e74d7adc64640e4e6ea6748b83d8f # Create a PR or update the Action's existing PR
env:
Expand Down
13 changes: 5 additions & 8 deletions tools/update-timezone.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ const fileNames = [
'timezoneTypes.res',
'metaZones.res',
];
execSync('rm -rf icu-data');
execSync('git clone https://github.com/unicode-org/icu-data');
const dirs = spawnSync(
'ls', {
cwd: 'icu-data/tzdata/icunew',
Expand Down Expand Up @@ -41,12 +39,11 @@ fileNames.forEach((file) => {
'icudt*.dat',
], { cwd: 'deps/icu-small/source/data/in/' }
);
spawnSync(
'rm', [
file
], { cwd: 'deps/icu-small/source/data/in/' }
)
});
execSync('bzip2 -z deps/icu-small/source/data/in/icudt*.dat');
fileNames.forEach((file) => {
renameSync(
`deps/icu-small/source/data/in/${file}`,
`icu-data/tzdata/icunew/${latestVersion}/44/le/${file}`
);
});
execSync('rm -rf icu-data');

0 comments on commit d3cfda9

Please sign in to comment.