From 541bdf1e92f074e934262c449504af2b193ee20f Mon Sep 17 00:00:00 2001 From: Jithil P Ponnan Date: Tue, 24 Oct 2023 04:22:16 +1100 Subject: [PATCH] src: add commit hash shorthand in zlib version src: add commit hash shorthand in zlib version PR-URL: https://github.com/nodejs/node/pull/50158 Fixes: https://github.com/nodejs/node/issues/50139 Reviewed-By: Marco Ippolito --- src/node_metadata.cc | 2 +- src/zlib_version.h | 6 ++++++ tools/dep_updaters/update-zlib.sh | 12 +++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 src/zlib_version.h diff --git a/src/node_metadata.cc b/src/node_metadata.cc index 112d6a9b7fb56f..f6837ba6d07933 100644 --- a/src/node_metadata.cc +++ b/src/node_metadata.cc @@ -14,7 +14,7 @@ #include "uv.h" #include "uvwasi.h" #include "v8.h" -#include "zlib.h" +#include "zlib_version.h" #if HAVE_OPENSSL #include diff --git a/src/zlib_version.h b/src/zlib_version.h new file mode 100644 index 00000000000000..77c4f92c5de0ef --- /dev/null +++ b/src/zlib_version.h @@ -0,0 +1,6 @@ +// This is an auto generated file, please do not edit. +// Refer to tools/dep_updaters/update-zlib.sh +#ifndef SRC_ZLIB_VERSION_H_ +#define SRC_ZLIB_VERSION_H_ +#define ZLIB_VERSION "1.2.13.1-motley-fef5869" +#endif // SRC_ZLIB_VERSION_H_ diff --git a/tools/dep_updaters/update-zlib.sh b/tools/dep_updaters/update-zlib.sh index a076c437cb38c3..5968d1129c987c 100755 --- a/tools/dep_updaters/update-zlib.sh +++ b/tools/dep_updaters/update-zlib.sh @@ -81,7 +81,17 @@ VERSION_NUMBER=$(grep "#define ZLIB_VERSION" "$DEPS_DIR/zlib/zlib.h" | sed -n "s NEW_VERSION="$VERSION_NUMBER-$LATEST_COMMIT" +# update version information in src/zlib_version.h +cat > "$ROOT/src/zlib_version.h" <