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
…#1270)

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 <wuhuizuo@126.com>

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored Sep 27, 2024
1 parent aecdbd8 commit 58fcdcf
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 58fcdcf

Please sign in to comment.