Skip to content

Commit

Permalink
Edit the way we set some derived variables
Browse files Browse the repository at this point in the history
To fix the shellcheck style issue:
^-- SC2116 (style): Useless echo? Instead of 'cmd $(echo foo)', just use 'cmd foo'.
  • Loading branch information
pallavisontakke committed Oct 17, 2024
1 parent 069159f commit fb25c89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion scripts/release/create_minor_release_PR_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git fetch --all

NEW_PATCH_VERSION="0"
NEW_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)
RELEASE_BRANCH=$(echo "${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}")
RELEASE_BRANCH="${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}"
CURRENT_VERSION=$(tail -1 version.config | cut -d ' ' -f 3)
cd sql/updates
LAST_VERSION=$(ls |grep $CURRENT_VERSION.sql |cut -d '-' -f 1)
Expand All @@ -38,6 +38,7 @@ LAST_DOWNGRADE_FILE="$CURRENT_VERSION--$LAST_VERSION.sql"
echo "---- Creating release branch $RELEASE_PR_BRANCH from $RELEASE_BRANCH, on the fork ----"

git checkout -b "$RELEASE_PR_BRANCH" upstream/"$RELEASE_BRANCH"
#git checkout -b "$RELEASE_PR_BRANCH" upstream/main
git branch
git pull && git diff HEAD

Expand Down
2 changes: 1 addition & 1 deletion scripts/release/create_minor_release_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NEW_PATCH_VERSION="0"

NEW_VERSION=$(head -1 version.config | cut -d ' ' -f 3 | cut -d '-' -f 1)

RELEASE_BRANCH=$(echo "${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}")
RELEASE_BRANCH="${NEW_VERSION/%.$NEW_PATCH_VERSION/.x}"

echo "RELEASE_BRANCH is $RELEASE_BRANCH"
echo "NEW_VERSION is $NEW_VERSION"
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/create_release_PR_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ cd sql/updates
LAST_VERSION=$(ls |grep $CURRENT_VERSION.sql |cut -d '-' -f 1)
CURRENT_PATCH_VERSION=$(echo $CURRENT_VERSION | cut -d '.' -f 3)
NEW_PATCH_VERSION=$((CURRENT_PATCH_VERSION + 1))
RELEASE_BRANCH=$(echo "${CURRENT_VERSION/%.$CURRENT_PATCH_VERSION/.x}")
NEW_VERSION=$(echo "${CURRENT_VERSION/%.$CURRENT_PATCH_VERSION/.$NEW_PATCH_VERSION}")
RELEASE_BRANCH="${CURRENT_VERSION/%.$CURRENT_PATCH_VERSION/.x}"
NEW_VERSION="${CURRENT_VERSION/%.$CURRENT_PATCH_VERSION/.$NEW_PATCH_VERSION}"

echo "CURRENT_VERSION is $CURRENT_VERSION"
echo "LAST_VERSION is $LAST_VERSION"
Expand Down

0 comments on commit fb25c89

Please sign in to comment.