Skip to content

Commit

Permalink
fix update-versions script
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Dec 6, 2023
1 parent a4cb5be commit c06d667
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/update-versions
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

VERSION="$1"
VERSION="${1:-$SE_VERSION}"
MAJOR_VERSION=$(echo "${VERSION}" | cut -d. -f1)
MINOR_VERSION=$(echo "${VERSION}" | cut -d. -f2)
PREVIOUS_MINOR_VERSION=$((MINOR_VERSION-1))
Expand All @@ -12,7 +12,9 @@ BUILD_TYPE="$2"
release_version() {
local FILE_PATH="$1"

if [[ "$FILE_PATH" == "rb/lib/selenium/webdriver/version.rb" ]]; then
if [[ "$FILE_PATH" == "java/version.bzl" ]]; then
sed -i '' "s/\.0-SNAPSHOT/\.0/g" "${FILE_PATH}"
elif [[ "$FILE_PATH" == "rb/lib/selenium/webdriver/version.rb" ]]; then
sed -i '' "s/\.nightly//g" "${FILE_PATH}"
else
sed -i '' "s/${PREVIOUS_VERSION}\.[0-9]*/${VERSION}/g" "${FILE_PATH}"
Expand Down

0 comments on commit c06d667

Please sign in to comment.