Skip to content

Commit

Permalink
tools: use UV_IS_RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-go committed Feb 5, 2023
1 parent 126e621 commit 8fbc9af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/dep_updaters/update-libuv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ VERSION_H="$DEPS_DIR/uv/include/uv/version.h"
CURRENT_MAJOR_VERSION=$(grep "#define UV_VERSION_MAJOR" "$VERSION_H" | sed -n "s/^.*MAJOR \(.*\)/\1/p")
CURRENT_MINOR_VERSION=$(grep "#define UV_VERSION_MINOR" "$VERSION_H" | sed -n "s/^.*MINOR \(.*\)/\1/p")
CURRENT_PATCH_VERSION=$(grep "#define UV_VERSION_PATCH" "$VERSION_H" | sed -n "s/^.*PATCH \(.*\)/\1/p")
CURRENT_IS_RELEASE=$(grep "#define UV_VERSION_IS_RELEASE" "$VERSION_H" | sed -n "s/^.*RELEASE \(.*\)/\1/p")
CURRENT_SUFFIX_VERSION=$(grep "#define UV_VERSION_SUFFIX" "$VERSION_H" | sed -n "s/^.*SUFFIX \"\(.*\)\"/\1/p")
SUFFIX_STRING=$([ -z "$CURRENT_SUFFIX_VERSION" ] && echo "" || echo "-$CURRENT_SUFFIX_VERSION")
SUFFIX_STRING=$([ "$CURRENT_IS_RELEASE" = 1 ] && [ -z "$CURRENT_SUFFIX_VERSION" ] && echo "" || echo "-$CURRENT_SUFFIX_VERSION")
CURRENT_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_PATCH_VERSION$SUFFIX_STRING"

if [ "$NEW_VERSION" = "$CURRENT_VERSION" ]; then
Expand Down

0 comments on commit 8fbc9af

Please sign in to comment.