Skip to content

Commit

Permalink
Cleanup (#172)
Browse files Browse the repository at this point in the history
* chore: powershell lint fixes

Signed-off-by: Mike Nguyen <[email protected]>

* chore: cleanup indentation

Signed-off-by: Mike Nguyen <[email protected]>

---------

Signed-off-by: Mike Nguyen <[email protected]>
  • Loading branch information
mikeee authored Jan 4, 2025
1 parent cb2a78b commit 2beebf8
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 23 deletions.
1 change: 0 additions & 1 deletion automatic/adobeair/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

. $PSScriptRoot\..\..\scripts\all.ps1

$releases = "https://airsdk.harman.com/runtime"
$releaseBaseUrl = "https://airsdk.harman.com/assets/downloads/"

function global:au_SearchReplace {
Expand Down
1 change: 0 additions & 1 deletion automatic/asana/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

$release32 = 'https://desktop-downloads.asana.com/win32_ia32/prod/latest/AsanaSetup.exe'
$release64 = 'https://desktop-downloads.asana.com/win32_x64/prod/latest/AsanaSetup.exe'
$checksumType = 'SHA256'

function global:au_SearchReplace {
@{
Expand Down
2 changes: 1 addition & 1 deletion automatic/bootstrap-studio.install/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function global:au_GetLatest {

$matched = $page.Content -match $regexVersion

If ($False -ne $matchedurl) {
If ($False -ne $matched) {
$url = -join("https://releases.bootstrapstudio.io/",$matches["version"],"/Bootstrap%20Studio%20-%20Setup.exe")
$version = $matches["version"]
}
Expand Down
2 changes: 1 addition & 1 deletion automatic/clojure/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function global:au_GetLatest {

$matched = $page.Content -match $regexVersion

If ($False -ne $matchedurl) {
If ($False -ne $matched) {
$url = -join("https://download.clojure.org/install/clojure-tools-",$matches["version"],".zip")
$version = $matches["version"]
}
Expand Down
6 changes: 4 additions & 2 deletions automatic/hcloud.portable/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ function global:au_GetLatest {
$page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$regexUrl = 'hetznercloud\/cli\/releases\/tag\/v(?<version>[\d\.]+)'

$match = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href
$matched = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href

$ver = $matches.version
If ($False -ne $matched) {
$ver = $matches.version
}

return @{
URL32 = "https://github.com/hetznercloud/cli/releases/download/v$ver/hcloud-windows-386.zip"
Expand Down
7 changes: 5 additions & 2 deletions automatic/icue/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ function global:au_GetLatest {

$matched = $page.Content -match $regexVersion

If ($False -ne $matched) {
$ver = $matches.version
}

return @{
URL = $releaseUrl
Checksum = $checksum
Checksum = $checksum
ChecksumType = $checksumType
Version = $matches.version
Version = $ver
}
}

Expand Down
2 changes: 0 additions & 2 deletions automatic/kakaotalk/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ $softwareName = 'KakaoTalk*'
$installerType = 'exe'
$silentArgs = '/S'

$uninstalled = $false

[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName

if ($key.Count -eq 1) {
Expand Down
6 changes: 4 additions & 2 deletions automatic/kakaotalk/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ function global:au_GetLatest {
$regexPage = '(?<version>[\d]+\.[\d]+\.[\d]+\.[\d]+)'

$matched = $page.Content -match $regexPage

$version = $matches["version"]

If ($False -ne $matched) {
$version = $matches["version"]
}

return @{
URL = $release
Expand Down
2 changes: 1 addition & 1 deletion automatic/local/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. $PSScriptRoot\..\..\scripts\all.ps1

$releases = 'https://localwp.com/releases/'
#$releases = 'https://localwp.com/releases/'

go mod tidy

Expand Down
2 changes: 1 addition & 1 deletion automatic/sparkmail/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function global:au_GetLatest {

$matched = $page.Content -match $regexVersion

If ($False -ne $matchedurl) {
If ($False -ne $matched) {
$url = -join("https://downloads.sparkmailapp.com/Spark3/win/dist/",$matches["version"],"/Spark.exe")
$version = $matches["version"]
}
Expand Down
6 changes: 4 additions & 2 deletions automatic/sqlite-studio.portable/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ function global:au_GetLatest {
$page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$regexUrl = 'pawelsalawa\/sqlitestudio\/releases\/tag\/(?<version>[\d\.]+)'

$match = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href
$matched = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href

$ver = $matches.version
If ($False -ne $matched) {
$ver = $matches.version
}

return @{
URL32 = "https://github.com/pawelsalawa/sqlitestudio/releases/download/$ver/sqlitestudio_i386-$ver.zip"
Expand Down
3 changes: 0 additions & 3 deletions automatic/superantispyware/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
$packageName = $env:ChocolateyPackageName
$installerType = 'EXE'
$silentArgs = '/noui /clean'
$validExitCodes = @(0)
$path = "$env:ProgramFiles\SUPERAntiSpyware"
$path86 = "${env:ProgramFiles(x86)}\SUPERAntiSpyware"
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'https://www.superantispyware.com/downloads/SASUNINST.EXE'
$checksum = '0bc49dea91079a174f674e7ea9a2e5c953ee78498421d9d2f8ecc7f5d986545d'
Expand Down
6 changes: 4 additions & 2 deletions automatic/superantispyware/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ function global:au_GetLatest {

$matched = $page.Content -match $regexPage

$version = $matches["version"]

If ($False -ne $matched) {
$version = $matches["version"]
}

$url = "https://securedownloads.superantispyware.com/SUPERAntiSpyware.exe"

return @{
Expand Down
6 changes: 4 additions & 2 deletions automatic/vultr-cli.portable/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ function global:au_GetLatest {
$page = Invoke-WebRequest -Uri $releases -UseBasicParsing
$regexUrl = 'vultr\/vultr-cli\/releases\/tag\/v(?<version>[\d\.]+)'

$url64 = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href
$matched = $page.links | Where-Object href -match $regexUrl | Select-Object -First 1 -expand href

$ver = $matches.version
If ($False -ne $matched) {
$ver = $matches.version
}

return @{
URL64 = "https://github.com/vultr/vultr-cli/releases/download/v$ver/vultr-cli_v"+$ver+"_windows_amd64.zip"
Expand Down

0 comments on commit 2beebf8

Please sign in to comment.