Skip to content

Commit 9cc73d3

Browse files
refacktargos
authored andcommitted
tools,icu: read full ICU version info from file
* ATM on every ICU version bump we need to update these data. Reading it from a file makes it independant of `configre.py` changes. * Update guide. PR-URL: #23269 Refs: #23245 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 5c9ef5e commit 9cc73d3

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

configure.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import sys
23
import errno
34
import optparse
@@ -1252,13 +1253,9 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
12521253
return list
12531254

12541255
def configure_intl(o):
1255-
icus = [
1256-
{
1257-
'url': 'https://sourceforge.net/projects/icu/files/ICU4C/62.1/icu4c-62_1-src.zip',
1258-
'md5': '408854f7b9b58311b68fab4b4dfc80be',
1259-
},
1260-
]
12611256
def icu_download(path):
1257+
with open('tools/icu/current_ver.dep') as f:
1258+
icus = json.load(f)
12621259
# download ICU, if needed
12631260
if not os.access(options.download_path, os.W_OK):
12641261
error('''Cannot write to desired download path.

tools/icu/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ make clean
9292
tools/license-builder.sh
9393
```
9494

95-
- Now, fix the default URL for the `full-icu` build in `/configure.py`, in
96-
the `configure_intl()` function. It should match the ICU URL used in the
97-
first step. When this is done, the following should build with full ICU.
95+
- Update the URL and hash for the full ICU file in `tools/icu/current_ver.dep`.
96+
It should match the ICU URL used in the first step. When this is done, the
97+
following should build with full ICU.
9898

9999
```shell
100100
# clean up
@@ -104,7 +104,7 @@ make
104104
make test-ci
105105
```
106106

107-
- commit the change to `configure.py` along with the updated `LICENSE` file.
107+
- commit the change to `tools/icu/current_ver.dep` and `LICENSE` files.
108108

109109
- Note: To simplify review, I often will “pre-land” this patch, meaning that
110110
I run the patch through `curl -L https://github.com/nodejs/node/pull/xxx.patch

tools/icu/current_ver.dep

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"url": "https://sourceforge.net/projects/icu/files/ICU4C/62.1/icu4c-62_1-src.zip",
4+
"md5": "408854f7b9b58311b68fab4b4dfc80be"
5+
}
6+
]

0 commit comments

Comments
 (0)