We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Script:
# Get-SublimeText.ps1 # Define AppName $AppName = "Sublime Text" $ReleaseUrl = "https://www.sublimetext.com/download_thanks" $InstallInstructionsUrl = "https://docs.sublimetext.io/guide/getting-started/installation.html" Write-Verbose "Obtaining $($AppName) Release Versions from $($ReleaseUrl)...`n" # Main script to fetch and process links $AppVersions = @( @{AppName = "$($AppName) Installer"; Type = 'exe'; Pattern = 'Windows'; VersionPattern = 'build_(\d+)_x64_setup'} @{AppName = "$($AppName) Portable"; Type = 'zip'; Pattern = 'portable version'; VersionPattern = 'build_(\d+)_x64'} ) foreach ($AppVersion in $AppVersions) { $SearchCount = 1 # This may need increasing as future versions are released #Build each link with File Type specific versions $URL = (Resolve-Uri -Uri (Get-Link -Uri $ReleaseUrl -MatchProperty OuterHTML -Pattern $AppVersion.Pattern)).Uri $Version = Get-Version -String $URL -Pattern $AppVersion.VersionPattern do { if ($URL) { New-NevergreenApp -Name $($AppVersion.AppName) -Version $($Version) -Uri $($URL) -Architecture 'multi' -Type $($AppVersion.Type) break } $SearchCount-- } until ($SearchCount -eq 0) if ($SearchCount -eq 0) { Write-Warning "Could not find release for $($AppName) $($AppVersion.Type)" } } $ReleaseNotesUrl = "https://www.sublimetext.com/download" Write-Verbose "$($AppName) Release notes are available here: $($ReleaseNotesUrl)" Write-Verbose "$($AppName) Install instructions are available here: $($InstallInstructionsUrl)"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Script:
The text was updated successfully, but these errors were encountered: