Skip to content

Commit c4b33b5

Browse files
committed
refactor: use braces instead of subshell in get_tag
No need to fork a subshell for the grep fallback; a brace group works the same way and avoids the overhead.
1 parent 8a54967 commit c4b33b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ function get_tag {
2323
local KERNEL_VERSION="${1}"
2424

2525
# list all tags from newest to oldest
26-
(
26+
{
2727
git --no-pager tag -l --sort=-creatordate | grep "microvm-kernel-${KERNEL_VERSION}-.*\.amzn2" \
2828
|| git --no-pager tag -l --sort=-creatordate | grep "kernel-${KERNEL_VERSION}-.*\.amzn2"
29-
) | head -n1
29+
} | head -n1
3030
}
3131

3232
function build_version {

0 commit comments

Comments
 (0)