File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ if [ -z "$ISOMER_BUILD_REPO_BRANCH" ]; then
1919 # --sort='v:refname': Sorts the tags by version number according to the semantic versioning scheme
2020 # tail -n1: Gets the last line of the output.
2121 # awk '{print $2}': Prints the second column of the last line, which is the tag name.
22- # sed 's/refs\/tags\///': Removes the 'refs/tags/' prefix from the tag name.
23- ISOMER_BUILD_REPO_BRANCH=$( git ls-remote --tags --sort=' v:refname' https://github.com/opengovsg/isomer.git | tail -n1 | awk ' {print $2}' | sed ' s/refs\/tags\///' )
22+ # sed -E 's|refs/tags/||; s/\^.*$//': Removes the 'refs/tags/' prefix from the tag name.
23+ # - If tag is annotated (maybe due to signing), the tag name will have a caret (^) and optional text after it.
24+ ISOMER_BUILD_REPO_BRANCH=$( git ls-remote --tags --sort=' v:refname' https://github.com/opengovsg/isomer.git | tail -n1 | awk ' {print $2}' | sed -E ' s|refs/tags/||; s/\^.*$//' )
2425fi
2526
2627# Store the current directory
Original file line number Diff line number Diff line change @@ -19,8 +19,9 @@ if [ -z "$ISOMER_BUILD_REPO_BRANCH" ]; then
1919 # --sort='v:refname': Sorts the tags by version number according to the semantic versioning scheme
2020 # tail -n1: Gets the last line of the output.
2121 # awk '{print $2}': Prints the second column of the last line, which is the tag name.
22- # sed 's/refs\/tags\///': Removes the 'refs/tags/' prefix from the tag name.
23- ISOMER_BUILD_REPO_BRANCH=$( git ls-remote --tags --sort=' v:refname' https://github.com/opengovsg/isomer.git | tail -n1 | awk ' {print $2}' | sed ' s/refs\/tags\///' )
22+ # sed -E 's|refs/tags/||; s/\^.*$//': Removes the 'refs/tags/' prefix from the tag name.
23+ # - If tag is annotated (maybe due to signing), the tag name will have a caret (^) and optional text after it.
24+ ISOMER_BUILD_REPO_BRANCH=$( git ls-remote --tags --sort=' v:refname' https://github.com/opengovsg/isomer.git | tail -n1 | awk ' {print $2}' | sed -E ' s|refs/tags/||; s/\^.*$//' )
2425 IS_USING_RELEASE_TAG=true
2526fi
2627
You can’t perform that action at this time.
0 commit comments