Skip to content

Commit 9c7af51

Browse files
authored
src: add commit hash shorthand in zlib version
src: add commit hash shorthand in zlib version PR-URL: #50158 Fixes: #50139 Reviewed-By: Marco Ippolito <[email protected]>
1 parent b00e3b3 commit 9c7af51

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/node_metadata.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "uv.h"
1515
#include "uvwasi.h"
1616
#include "v8.h"
17-
#include "zlib.h"
17+
#include "zlib_version.h"
1818

1919
#if HAVE_OPENSSL
2020
#include <openssl/opensslv.h>

src/zlib_version.h

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// This is an auto generated file, please do not edit.
2+
// Refer to tools/dep_updaters/update-zlib.sh
3+
#ifndef SRC_ZLIB_VERSION_H_
4+
#define SRC_ZLIB_VERSION_H_
5+
#define ZLIB_VERSION "1.2.13.1-motley-fef5869"
6+
#endif // SRC_ZLIB_VERSION_H_

tools/dep_updaters/update-zlib.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,17 @@ VERSION_NUMBER=$(grep "#define ZLIB_VERSION" "$DEPS_DIR/zlib/zlib.h" | sed -n "s
8181

8282
NEW_VERSION="$VERSION_NUMBER-$LATEST_COMMIT"
8383

84+
# update version information in src/zlib_version.h
85+
cat > "$ROOT/src/zlib_version.h" <<EOF
86+
// This is an auto generated file, please do not edit.
87+
// Refer to tools/dep_updaters/update-zlib.sh
88+
#ifndef SRC_ZLIB_VERSION_H_
89+
#define SRC_ZLIB_VERSION_H_
90+
#define ZLIB_VERSION "$NEW_VERSION"
91+
#endif // SRC_ZLIB_VERSION_H_
92+
EOF
93+
8494
# Update the version number on maintaining-dependencies.md
8595
# and print the new version as the last line of the script as we need
8696
# to add it to $GITHUB_ENV variable
87-
finalize_version_update "zlib" "$NEW_VERSION"
97+
finalize_version_update "zlib" "$NEW_VERSION" "src/zlib_version.h"

0 commit comments

Comments
 (0)