-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate.ps1
30 lines (26 loc) · 805 Bytes
/
update.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Import-Module au
# Load a helper script
$helper = Join-Path $PSScriptRoot 'update_helper.ps1'
. $helper
function global:au_GetLatest {
$version = Find-PleiadesVersion
return @{
Version = $version.semver
ChecksumType64 = 'md5'
Streams = (Get-PleiadesStreams $version.array)
}
}
function global:au_SearchReplace {
@{
"pleiades-streams.nuspec" = @{
'(?i)(^\s*\<title\>).*(\<\/title\>)' = "`${1}$($Latest.Title)`${2}"
}
"tools\chocolateyInstall.ps1" = @{
"(^\s*[$]packageName)\s*=.*" = "`${1} = '$($Latest.PackageName)'"
"(^\s*[$]url)\s*=.*" = "`${1} = '$($Latest.URL64)'"
"(^\s*[$]checksum)\s*=.*" = "`${1} = '$($Latest.Checksum64)'"
"(^\s*[$]shortcutName)\s*=.*" = "`${1} = '$($Latest.Title).lnk'"
}
}
}
Update-Package -ChecksumFor 64