Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea2fab8

Browse files
Minor code refactoring (#16)
1 parent 21a3704 commit ea2fab8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gh-codeql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ function get_latest() {
9797
if [ "$channel" = "release" ]; then
9898
# For the release channel, we sort by semantic version order since the tags correspond to release versions.
9999
# We ignore draft releases and pre-release versions in this case since we want to give the user a stable version.
100-
echo $(gh api "repos/$repo/releases" --paginate --jq ".[] | select(.draft == false and .prerelease == false) | .tag_name" | sort -V | tail -1)
100+
gh api "repos/$repo/releases" --paginate --jq ".[] | select(.draft == false and .prerelease == false) | .tag_name" | sort -V | tail -1
101101
else
102102
# For the nightly channel, we just take the latest release since the tags there are not semantic versions.
103-
echo $(gh api "repos/$repo/releases" --jq ".[].tag_name" | head -1)
103+
gh api "repos/$repo/releases" --jq ". | first | .tag_name"
104104
fi
105105
}
106106

0 commit comments

Comments
 (0)