Skip to content

Commit

Permalink
fix(apps/prod/tekton/configs/tasks): fix clone-ext for hotfix cases
Browse files Browse the repository at this point in the history
before:
```
~/tidb # MAJOR_MINOR_PATCH=$(echo "$RELEASE_VERSION" | awk -F. '{print $1 "." $2 "." $3}')
~/tidb # echo $MAJOR_MINOR_PATCH
v7.5.2-20240705-eaff0fb
```

after:
```
~/tidb #  MAJOR_MINOR_PATCH=$(echo "$RELEASE_VERSION" |grep -oE "^v[0-9]+[.][0-9]+[.][0-9]+")
~/tidb # echo $MAJOR_MINOR_PATCH
v7.5.2
```

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo committed Sep 27, 2024
1 parent 1075f0b commit 9b6758e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/prod/tekton/configs/tasks/pingcap-git-clone-ext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ spec:
EXT_REVERSION=$(echo "$MAJOR_MINOR" | sed -E 's/^v/release-/')
elif [[ $origin_ref =~ "^release-[0-9]+\.[0-9]+-.*-v[0-9]+\.[0-9]+\.[0-9]+" ]]; then
# hotfix branches
MAJOR_MINOR_PATCH=$(echo "$RELEASE_VERSION" | awk -F. '{print $1 "." $2 "." $3}')
MAJOR_MINOR_PATCH=$(echo "$RELEASE_VERSION" | grep -oE "^v[0-9]+[.][0-9]+[.][0-9]+")
EXT_REVERSION=$(echo "$MAJOR_MINOR_PATCH" | sed -E 's/^v/release-/')
elif [[ $origin_ref =~ "^(master|main|feature/.*)$" ]]; then
EXT_REVERSION="master"
Expand Down

0 comments on commit 9b6758e

Please sign in to comment.