diff options
| author | ruki <[email protected]> | 2021-05-06 00:45:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-05-06 00:45:24 +0800 |
| commit | 75854ac3b895470512e11463bcdfd81871022b66 (patch) | |
| tree | 5f7f3968fea9259b8755e323ecd612c57e9e7ed9 | |
| parent | c6c7b3b7870c0bdbea911b726af1853d33d9b667 (diff) | |
improve appveyor
| -rw-r--r-- | .appveyor.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 6b2ab6db2..6affccca0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -69,6 +69,32 @@ after_build: .\scripts\installer.nsi - ps: Push-AppveyorArtifact .\scripts\xmake.exe -FileName xmake-installer.exe -DeploymentName "xmake-installer" - ps: (Get-FileHash .\scripts\xmake.exe -Algorithm SHA256).Hash.ToLower() + " *xmake-installer.exe`n" | Out-File ./shafile -Encoding ASCII -NoNewLine -Append + # publish zip archive + - ps: Copy-Item .\*.md .\xmake + - ps: Copy-Item C:\winenv\ .\xmake -Recurse + - ps: Copy-Item .\core\build\xmake.exe .\xmake + - ps: Copy-Item .\scripts\xrepo.bat .\xrepo.bat + - ps: Copy-Item .\scripts\xrepo.ps1 .\xrepo.ps1 + - ps: |- + Add-Type -AssemblyName System.Text.Encoding + Add-Type -AssemblyName System.IO.Compression.FileSystem + + class FixedEncoder : System.Text.UTF8Encoding { + FixedEncoder() : base($true) { } + + [byte[]] GetBytes([string] $s) + { + $s = $s.Replace("\", "/") + return ([System.Text.UTF8Encoding]$this).GetBytes($s) + } + } + Copy-Item .\xmake .\archive\xmake -Recurse + + [System.IO.Compression.ZipFile]::CreateFromDirectory("$PWD\archive", "$PWD\archive.zip", [System.IO.Compression.CompressionLevel]::Optimal, $false, [FixedEncoder]::new()) + - ps: Push-AppveyorArtifact .\archive.zip -FileName xmake.zip -DeploymentName "xmake-archive" + - ps: (Get-FileHash .\archive.zip -Algorithm SHA256).Hash.ToLower() + " *xmake.zip`n" | Out-File ./shafile -Encoding ASCII -NoNewLine -Append + # publish sha file + - ps: Push-AppveyorArtifact ./shafile -FileName xmake.sha256 -DeploymentName "xmake-shafile" test_script: - ps: xmake --version |
