1#!/bin/sh 2set -e 3# Shell script to update v8 patch update 4 5BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) 6 7cd "$BASE_DIR" 8 9IS_UP_TO_DATE=$(git node v8 minor | grep "V8 is up-to-date") 10 11if [ -n "$IS_UP_TO_DATE" ]; then 12 echo "Skipped because V8 is on the latest version." 13 exit 0 14fi 15 16DEPS_DIR="$BASE_DIR/deps" 17 18CURRENT_MAJOR_VERSION=$(grep "#define V8_MAJOR_VERSION" "$DEPS_DIR/v8/include/v8-version.h" | cut -d ' ' -f3) 19CURRENT_MINOR_VERSION=$(grep "#define V8_MINOR_VERSION" "$DEPS_DIR/v8/include/v8-version.h" | cut -d ' ' -f3) 20CURRENT_BUILD_VERSION=$(grep "#define V8_BUILD_NUMBER" "$DEPS_DIR/v8/include/v8-version.h" | cut -d ' ' -f3) 21CURRENT_PATCH_VERSION=$(grep "#define V8_PATCH_LEVEL" "$DEPS_DIR/v8/include/v8-version.h" | cut -d ' ' -f3) 22 23NEW_VERSION="$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION.$CURRENT_BUILD_VERSION.$CURRENT_PATCH_VERSION" 24 25echo "All done!" 26echo "" 27 28# The last line of the script should always print the new version, 29# as we need to add it to $GITHUB_ENV variable. 30echo "NEW_VERSION=$NEW_VERSION" 31