Skip to content

Commit

Permalink
v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysedoy97 committed May 27, 2022
1 parent 9853960 commit 73570d0
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions get-bin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ${PS1_FILE} = Join-Path -Path ${PS1_HOME} -ChildPath "get-bin.ps1"
${GITHUB_PATH} = Join-Path -Path ${PS1_HOME} -ChildPath ".github"
${STORE_PATH} = Join-Path -Path ${PS1_HOME} -ChildPath ".store"
${7ZIP} = Join-Path -Path ${ENV:PROGRAMFILES} -ChildPath "7-Zip" -AdditionalChildPath "7z.exe"
${VERSION} = "v0.4.1"
${VERSION} = "v0.4.2"
${HELP} = @"
Usage:
get-bin self-install - update get-bin to latest version
Expand Down Expand Up @@ -83,13 +83,11 @@ function GetGitHubTagNameFromReleases {
Write-Host $_
exit
}
if (${releases}.Count -eq 0) {
return $null
}
${filtered_releases} = (${releases} | Where-Object -Property "prerelease" -eq $false)
if ($null -ne ${filtered_releases}) {
return ${filtered_releases}[0].tag_name
if (${filtered_releases}.Count -eq 0) {
return $null
}
return ${filtered_releases}[0].tag_name
}
}

Expand Down Expand Up @@ -118,13 +116,11 @@ function GetGitHubTagNameFromTags {
Write-Host $_
exit
}
if (${tags}.Count -eq 0) {
return $null
}
${filtered_tags} = (${tags} | Where-Object -Property "name" -clike ${Pattern})
if ($null -ne ${filtered_tags}) {
return ${filtered_tags}[0].name
if (${filtered_tags}.Count -eq 0) {
return $null
}
return ${filtered_tags}[0].name
}
}

Expand Down

0 comments on commit 73570d0

Please sign in to comment.