mirror of
https://github.com/nodejs/node.git
synced 2025-12-28 07:50:41 +00:00
tools: do not use short hashes for deps versioning to avoid collision
PR-URL: https://github.com/nodejs/node/pull/60407 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
parent
d9cf867a9d
commit
617622211f
@ -86,4 +86,4 @@ echo "$NEW_GYP" >"$DEPS_DIR/googletest/googletest.gyp"
|
||||
# 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 "googletest" "$NEW_VERSION"
|
||||
finalize_version_update "googletest" "$NEW_UPSTREAM_SHA1"
|
||||
|
||||
@ -8,16 +8,15 @@ NIXPKGS_PIN_FILE="$BASE_DIR/tools/nix/pkgs.nix"
|
||||
|
||||
NIXPKGS_REPO=$(grep 'repo =' "$NIXPKGS_PIN_FILE" | awk -F'"' '{ print $2 }')
|
||||
CURRENT_VERSION_SHA1=$(grep 'rev =' "$NIXPKGS_PIN_FILE" | awk -F'"' '{ print $2 }')
|
||||
CURRENT_VERSION=$(echo "$CURRENT_VERSION_SHA1" | head -c 7)
|
||||
|
||||
NEW_UPSTREAM_SHA1=$(git ls-remote "$NIXPKGS_REPO.git" nixpkgs-unstable | awk '{print $1}')
|
||||
NEW_VERSION=$(echo "$NEW_UPSTREAM_SHA1" | head -c 7)
|
||||
NEW_VERSION=$(echo "$NEW_UPSTREAM_SHA1" | head -c 35)
|
||||
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. "$BASE_DIR/tools/dep_updaters/utils.sh"
|
||||
|
||||
compare_dependency_version "nixpkgs-unstable" "$NEW_VERSION" "$CURRENT_VERSION"
|
||||
compare_dependency_version "nixpkgs-unstable" "$CURRENT_VERSION_SHA1" "$NEW_UPSTREAM_SHA1"
|
||||
|
||||
CURRENT_TARBALL_HASH=$(grep 'sha256 =' "$NIXPKGS_PIN_FILE" | awk -F'"' '{ print $2 }')
|
||||
NEW_TARBALL_HASH=$(nix-prefetch-url --unpack "$NIXPKGS_REPO/archive/$NEW_UPSTREAM_SHA1.tar.gz")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user