-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate-binaries.ps1
More file actions
30 lines (25 loc) · 953 Bytes
/
update-binaries.ps1
File metadata and controls
30 lines (25 loc) · 953 Bytes
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
<#
.SYNOPSIS
Regenerates the embedded assets for 3270Connect from the existing `binaries/` tree.
.DESCRIPTION
This script simply runs `go-bindata` with the current contents of `binaries/` so you
don’t need to re-download anything. Keep the native executables already in
`binaries/linux` and `binaries/windows`, then run this from the repo root whenever you
update those files.
#>
Set-StrictMode -Version Latest
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
$repoRoot = Resolve-Path $scriptRoot
$goBindata = Get-Command -Name go-bindata -ErrorAction SilentlyContinue
if (-not $goBindata) {
Write-Error 'go-bindata is not on the PATH; install it via `go install github.com/go-bindata/go-bindata/...` and retry.'
exit 1
}
Write-Host '[INFO]' (Get-Date).ToString('HH:mm:ss') 'running go-bindata'
Push-Location $repoRoot
try {
& $goBindata -o binaries/bindata.go -pkg binaries ./binaries/...
}
finally {
Pop-Location
}