From 9cc73d384efda3d479a13d8895716cf8f537a601 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Thu, 4 Oct 2018 16:44:34 -0400 Subject: [PATCH] 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: https://github.com/nodejs/node/pull/23269 Refs: https://github.com/nodejs/node/issues/23245 Reviewed-By: Steven R Loomis Reviewed-By: James M Snell Reviewed-By: Richard Lau Reviewed-By: Luigi Pinca Reviewed-By: Michael Dawson Reviewed-By: Trivikram Kamat --- configure.py | 9 +++------ tools/icu/README.md | 8 ++++---- tools/icu/current_ver.dep | 6 ++++++ 3 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 tools/icu/current_ver.dep diff --git a/configure.py b/configure.py index b98e37d944d7f0..bfed05d495a957 100755 --- a/configure.py +++ b/configure.py @@ -1,3 +1,4 @@ +import json import sys import errno import optparse @@ -1252,13 +1253,9 @@ def glob_to_var(dir_base, dir_sub, patch_dir): return list def configure_intl(o): - icus = [ - { - 'url': 'https://sourceforge.net/projects/icu/files/ICU4C/62.1/icu4c-62_1-src.zip', - 'md5': '408854f7b9b58311b68fab4b4dfc80be', - }, - ] def icu_download(path): + with open('tools/icu/current_ver.dep') as f: + icus = json.load(f) # download ICU, if needed if not os.access(options.download_path, os.W_OK): error('''Cannot write to desired download path. diff --git a/tools/icu/README.md b/tools/icu/README.md index 01c12279311441..a2613544241b8e 100644 --- a/tools/icu/README.md +++ b/tools/icu/README.md @@ -92,9 +92,9 @@ make clean tools/license-builder.sh ``` -- Now, fix the default URL for the `full-icu` build in `/configure.py`, in -the `configure_intl()` function. It should match the ICU URL used in the -first step. When this is done, the following should build with full ICU. +- Update the URL and hash for the full ICU file in `tools/icu/current_ver.dep`. +It should match the ICU URL used in the first step. When this is done, the +following should build with full ICU. ```shell # clean up @@ -104,7 +104,7 @@ make make test-ci ``` -- commit the change to `configure.py` along with the updated `LICENSE` file. +- commit the change to `tools/icu/current_ver.dep` and `LICENSE` files. - Note: To simplify review, I often will “pre-land” this patch, meaning that I run the patch through `curl -L https://github.com/nodejs/node/pull/xxx.patch diff --git a/tools/icu/current_ver.dep b/tools/icu/current_ver.dep new file mode 100644 index 00000000000000..5e439928ebb540 --- /dev/null +++ b/tools/icu/current_ver.dep @@ -0,0 +1,6 @@ +[ + { + "url": "https://sourceforge.net/projects/icu/files/ICU4C/62.1/icu4c-62_1-src.zip", + "md5": "408854f7b9b58311b68fab4b4dfc80be" + } +]