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 <marcoippolito54@gmail.com>
pull/50349/head
Jithil P Ponnan 2023-10-24 04:22:16 +11:00 committed by GitHub
parent b00e3b300e
commit 9c7af51049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#include "uv.h"
#include "uvwasi.h"
#include "v8.h"
#include "zlib.h"
#include "zlib_version.h"
#if HAVE_OPENSSL
#include <openssl/opensslv.h>

View File

@ -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_

View File

@ -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" <<EOF
// 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 "$NEW_VERSION"
#endif // SRC_ZLIB_VERSION_H_
EOF
# Update the version number on maintaining-dependencies.md
# and print the new version as the last line of the script as we need
# to add it to $GITHUB_ENV variable
finalize_version_update "zlib" "$NEW_VERSION"
finalize_version_update "zlib" "$NEW_VERSION" "src/zlib_version.h"