Skip to content

Commit

Permalink
src: add commit hash shorthand in zlib version
Browse files Browse the repository at this point in the history
src: add commit hash shorthand in zlib version
PR-URL: #50158
Fixes: #50139
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
  • Loading branch information
MrJithil authored Oct 23, 2023
1 parent b00e3b3 commit 9c7af51
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 6 additions & 0 deletions src/zlib_version.h
Original file line number Diff line number Diff line change
@@ -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_
12 changes: 11 additions & 1 deletion tools/dep_updaters/update-zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 9c7af51

Please sign in to comment.