mkevenaar / chocolatey-packages

My chocolatey packages
https://mkevenaar.github.io/chocolatey-packages/
Apache License 2.0
42 stars 66 forks source link

(microsoft-windows-terminal) Fix update.ps1 #200

Closed yan12125 closed 1 year ago

yan12125 commented 1 year ago

Description

Since version 1.17.11391.0, Windows 10 and Windows 11 packages are rejoined [1], and the win10 pattern in filenames are gone.

Fixes https://github.com/mkevenaar/chocolatey-packages/issues/198

[1] https://github.com/microsoft/terminal/releases/tag/v1.17.11391.0

Motivation and Context

Get the latest Microsoft Terminal automatically https://github.com/mkevenaar/chocolatey-packages/issues/198

How Has this Been Tested?

PS> .\update.ps1
microsoft-windows-terminal - checking updates using au version 2022.10.24

*** Stream: Microsoft.WindowsTerminal ***
URL check
  https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle
nuspec version: 1.16.10261.0
remote version: 1.17.11461.0
New version is available
Automatic checksum skipped
Running au_BeforeUpdate
Purging msixbundle
Downloading to Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle - https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle
Setting package description from README.md
Updating files
  $Latest data:
    Checksum32                (String)     E3A5A581F2A404D9D97F6826890BE9FD7BFC827498035D6C45E1C12F9D2D4E8F
    ChecksumType32            (String)     sha256
    FileName32                (String)     Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle
    FileType                  (String)     msixbundle
    NuspecVersion             (String)     1.16.10261.0
    PackageName               (String)     microsoft-windows-terminal
    PreRelease                ()           False
    RemoteVersion             (String)     1.17.11461.0
    Stream                    (String)     Microsoft.WindowsTerminal
    Streams                   (Hashtable)  System.Collections.Hashtable
    URL32                     (String)     https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle
    Version                   (AUVersion)  1.17.11461.0
  microsoft-windows-terminal.nuspec
    setting id: microsoft-windows-terminal
    updating version: 1.16.10261.0 -> 1.17.11461.0
  .\tools\chocolateyInstall.ps1
    (^[$]fileName\s*=\s*"[$]toolsDir\\).* = ${1}Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle"
    (^[$]PreRelease\s*=\s*)".*"         = ${1}"False"
    (^[$]version\s*=\s*)".*"            = ${1}"1.17.11461.0"
  .\legal\VERIFICATION.txt
    (?i)(checksum32:).*                 = ${1} E3A5A581F2A404D9D97F6826890BE9FD7BFC827498035D6C45E1C12F9D2D4E8F
    (?i)(listed on\s*)\<.*\>            = ${1}<https://api.github.com/repos/microsoft/terminal/releases>
    (?i)(32-Bit.+)\<.*\>                = ${1}<https://github.com/microsoft/terminal/releases/download/v1.17.11461.0/Microsoft.WindowsTerminal_1.17.11461.0_8wekyb3d8bbwe.msixbundle>
    (?i)(checksum type:).*              = ${1} sha256
  .\tools\chocolateyUninstall.ps1
    (^[$]PreRelease\s*=\s*)".*"         = ${1}"False"
Attempting to build package from 'microsoft-windows-terminal.nuspec'.
Successfully created package 'C:\Users\yen\Computer\windows\mkevenaar-chocolatey-packages\automatic\microsoft-windows-terminal\microsoft-windows-terminal.1.17.11461.nupkg'

*** Stream: Microsoft.WindowsTerminalPreview ***
URL check
  https://github.com/microsoft/terminal/releases/download/v1.18.1462.0/Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle
nuspec version: 1.17.1023-beta
remote version: 1.18.1462.0-beta
New version is available
Automatic checksum skipped
Running au_BeforeUpdate
Purging msixbundle
Downloading to Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle - https://github.com/microsoft/terminal/releases/download/v1.18.1462.0/Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle
Setting package description from README.md
Updating files
  $Latest data:
    Checksum32                (String)     60BF2D35DAC57DC2878C71C581CC3F000E1875A08AF318615E8FA6DD9288BCDA
    ChecksumType32            (String)     sha256
    FileName32                (String)     Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle
    FileType                  (String)     msixbundle
    NuspecVersion             (String)     1.17.1023-beta
    PackageName               (String)     microsoft-windows-terminal
    PreRelease                (Boolean)    True
    RemoteVersion             (String)     1.18.1462.0
    Stream                    (String)     Microsoft.WindowsTerminalPreview
    Streams                   (Hashtable)  System.Collections.Hashtable
    URL32                     (String)     https://github.com/microsoft/terminal/releases/download/v1.18.1462.0/Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle
    Version                   (AUVersion)  1.18.1462.0-beta
  microsoft-windows-terminal.nuspec
    setting id: microsoft-windows-terminal
    updating version: 1.17.1023-beta -> 1.18.1462.0-beta
  .\tools\chocolateyInstall.ps1
    (^[$]fileName\s*=\s*"[$]toolsDir\\).* = ${1}Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle"
    (^[$]PreRelease\s*=\s*)".*"         = ${1}"True"
    (^[$]version\s*=\s*)".*"            = ${1}"1.18.1462.0"
  .\legal\VERIFICATION.txt
    (?i)(checksum32:).*                 = ${1} 60BF2D35DAC57DC2878C71C581CC3F000E1875A08AF318615E8FA6DD9288BCDA
    (?i)(listed on\s*)\<.*\>            = ${1}<https://api.github.com/repos/microsoft/terminal/releases>
    (?i)(32-Bit.+)\<.*\>                = ${1}<https://github.com/microsoft/terminal/releases/download/v1.18.1462.0/Microsoft.WindowsTerminalPreview_1.18.1462.0_8wekyb3d8bbwe.msixbundle>
    (?i)(checksum type:).*              = ${1} sha256
  .\tools\chocolateyUninstall.ps1
    (^[$]PreRelease\s*=\s*)".*"         = ${1}"True"
Attempting to build package from 'microsoft-windows-terminal.nuspec'.
Successfully created package 'C:\Users\yen\Computer\windows\mkevenaar-chocolatey-packages\automatic\microsoft-windows-terminal\microsoft-windows-terminal.1.18.1462-beta.nupkg'

Package updated

Path          : C:\Users\yen\Computer\windows\mkevenaar-chocolatey-packages\automatic\microsoft-windows-terminal
Name          : microsoft-windows-terminal
Updated       : True
Pushed        : False
RemoteVersion : 1.18.1462.0-beta
NuspecVersion : 1.17.1023-beta
Result        : {microsoft-windows-terminal - checking updates using au version 2022.10.24, , *** Stream: Microsoft.WindowsTerminal ***, URL check…}
Error         :
NuspecPath    : C:\Users\yen\Computer\windows\mkevenaar-chocolatey-packages\automatic\microsoft-windows-terminal\microsoft-windows-terminal.nuspec
NuspecXml     : #document
Ignored       : False
IgnoreMessage :
StreamsPath   : C:\Users\yen\Computer\windows\mkevenaar-chocolatey-packages\automatic\microsoft-windows-terminal\microsoft-windows-terminal.json
Streams       : {[Microsoft.WindowsTerminal, System.Collections.Hashtable], [Microsoft.WindowsTerminalPreview, System.Collections.Hashtable]}

Screenshot (if appropriate, usually isn't needed):

Types of changes

Checklist:

AppVeyorBot commented 1 year ago

:x: Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look.

yan12125 commented 1 year ago

AppVeyor check failed with:

{"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}

Probably that's because the secure environment variable github_api_key is not set for pull requsts: https://www.appveyor.com/docs/how-to/secure-files/

mkevenaar commented 1 year ago

@yan12125 thank you for your contribution, your changes have been merged!