Релиз из пяти файлов: веб-форма Gitea больше не принимает
- make_release.ps1: образы BL616 (прошивка моста, загрузчик и штатная прошивка Sipeed) и настройки BLFlashCommand с путями к соседним файлам собираются в один архив bl616_bridge_firmware-v<версия>.zip с памяткой bin/release_readme.txt; - make_portable.ps1, make_release.ps1: zip через ZipFile с '/' в путях — Compress-Archive из PowerShell 5.1 пишет '\', и распаковщики кроме Проводника считают его частью имени файла; - make_portable.ps1: без файлов, которые BLFlashCommand оставляет в chips\ после прошивки (img_create\, eflash_loader_cfg.ini); - README, CHANGELOG: новый состав релиза.
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
# Collect the files of a release into dist\release\v<version>\:
|
||||
#
|
||||
# TangProgrammer-v<version>-win64.zip portable programmer (make_portable.ps1)
|
||||
# TangProgrammer.exe the program alone
|
||||
# tang25k_debugger_bl616.bin bridge firmware, @0x20000
|
||||
# bl616_bootloader_0x20000_nano20k_signed.bin Sipeed loader, @0x0
|
||||
# bl616_fpga_partner_25kDock.bin original Sipeed firmware, @0x0
|
||||
# fpga_test_bitstreams-GW5A-25.zip fpga_test\*\impl\pnr\*.fs, if built
|
||||
# TangProgrammer-v<version>-win64.zip portable programmer (make_portable.ps1)
|
||||
# TangProgrammer.exe the program alone
|
||||
# bl616_bridge_firmware-v<version>.zip bridge firmware (@0x20000), Sipeed loader
|
||||
# (@0x0), original Sipeed firmware, configs
|
||||
# for BLFlashCommand
|
||||
# fpga_test_bitstreams-GW5A-25.zip fpga_test\*\impl\pnr\*.fs, if built
|
||||
# SHA256SUMS.txt
|
||||
#
|
||||
# Five files at most: the Gitea web form takes no more than that ([attachment]
|
||||
# MAX_FILES on gitea.vector.ru), publish_release.ps1 has no such limit.
|
||||
#
|
||||
# .\scripts\build.ps1
|
||||
# .\scripts\make_release.ps1 version from FW_VERSION_STR in src\sys.h
|
||||
param([string]$Version)
|
||||
@@ -35,9 +38,23 @@ New-Item -ItemType Directory -Force $out | Out-Null
|
||||
Copy-Item (Join-Path $root 'dist\TangProgrammer.zip') (Join-Path $out "TangProgrammer-$tag-win64.zip")
|
||||
Copy-Item (Join-Path $root 'dist\TangProgrammer\TangProgrammer.exe') $out
|
||||
|
||||
Copy-Item $bridgeFw $out
|
||||
Copy-Item (Join-Path $root 'bin\bl616_bootloader_0x20000_nano20k_signed.bin') $out
|
||||
Copy-Item (Join-Path $root 'bin\bl616_fpga_partner_25kDock.bin') $out
|
||||
# the bridge images with the flash configs of the project root, pointing next to themselves
|
||||
$fw = Join-Path $out "bl616_bridge_firmware-$tag"
|
||||
New-Item -ItemType Directory -Force $fw | Out-Null
|
||||
Copy-Item $bridgeFw $fw
|
||||
Copy-Item (Join-Path $root 'bin\bl616_bootloader_0x20000_nano20k_signed.bin') $fw
|
||||
Copy-Item (Join-Path $root 'bin\bl616_fpga_partner_25kDock.bin') $fw
|
||||
foreach ($ini in 'flash_prog_cfg.ini', 'restore_prog_cfg.ini') {
|
||||
$text = [IO.File]::ReadAllText((Join-Path $root $ini))
|
||||
$text = $text.Replace('./build/build_out/', './').Replace('./bin/', './').Replace('$(CHIPNAME)', 'bl616')
|
||||
[IO.File]::WriteAllText((Join-Path $fw $ini), $text)
|
||||
}
|
||||
Copy-Item (Join-Path $root 'bin\release_readme.txt') (Join-Path $fw 'README.txt')
|
||||
# not Compress-Archive, see make_portable.ps1
|
||||
[AppContext]::SetSwitch('Switch.System.IO.Compression.ZipFile.UseBackslash', $false)
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
[IO.Compression.ZipFile]::CreateFromDirectory($fw, "$fw.zip", [IO.Compression.CompressionLevel]::Optimal, $true)
|
||||
Remove-Item -Recurse -Force $fw
|
||||
|
||||
$fs = @(Get-ChildItem (Join-Path $root 'fpga_test\*\impl\pnr\*.fs') -ErrorAction SilentlyContinue)
|
||||
if ($fs.Count) {
|
||||
|
||||
Reference in New Issue
Block a user