Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update update.ps1 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions garmin-express/garmin-express.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<version>7.13.1.0</version>
<packageSourceUrl>https://github.com/Grobi2010/au-chocolatey/tree/master/garmin-express</packageSourceUrl>
<!-- owners is a poor name for maintainers of the package. It sticks around by this name for compatibility reasons. It basically means you. -->
<owners>Grobi</owners>
<owners>Grobi virtualex</owners>
<!-- ============================== -->
<!-- == SOFTWARE SPECIFIC SECTION == -->
<!-- This section is about the software itself -->
<title>garmin-express (Install)</title>
<authors>Garmin Ltd.</authors>
<!-- projectUrl is required for the community feed -->
<projectUrl>https://www.garmin.com/en-US/software/express/</projectUrl>
<iconUrl>https://cdn.rawgit.com/criography/chocolatey-packages/v1.4/automatic/garmin-express/icon.png</iconUrl>
<copyright>Copyright © 1996-2022 Garmin Ltd.</copyright>
<iconUrl>https://rawcdn.githack.com/virtualex-itv/chocolatey-packages/da95d6d15a97b71935643992dcf624e170cf510f/icons/garmin-express.png</iconUrl>
<copyright>Copyright © 1996-2023 Garmin Ltd.</copyright>
<!-- If there is a license Url available, it is required for the community feed -->
<licenseUrl>https://static.garmin.com/pumac/EN-US_EN.html</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
Expand Down
4 changes: 3 additions & 1 deletion garmin-express/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$packageArgs = @{
$ErrorActionPreference = 'Stop'

$packageArgs = @{
packageName = "garmin-express"
fileType = "EXE"
url = "https://download.garmin.com/omt/express/GarminExpress.exe"
Expand Down
12 changes: 6 additions & 6 deletions garmin-express/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ function global:au_SearchReplace {

function global:au_GetLatest {
$download_page = Invoke-WebRequest -Uri $forumsticky -UseBasicParsing
$regex = 'Current Version of Garmin Express for Windows: v(?<version>[\d\.]+)'
$version = $download_page.Content -match $regex

$regex = 'Current Version of Garmin Express for Windows:\s+(?<version>[\d\.]+)'
if ($download_page.Content -match $regex) {
$version = $Matches.version

}

@{
URL32 = $url
Version = $version
}
}


update
Update-Package