2016-11-16 01:56:51 +01:00
|
|
|
# this is a port of setup_build.sh used for the unix platforms
|
2016-11-11 16:49:27 +01:00
|
|
|
|
|
|
|
function AddUi {
|
2016-11-09 18:35:03 +01:00
|
|
|
wget https://s3.amazonaws.com/lbry-ui/development/dist.zip -OutFile dist.zip
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
2016-11-11 16:49:27 +01:00
|
|
|
|
2016-11-09 18:35:03 +01:00
|
|
|
Expand-Archive dist.zip -dest lbrynet\resources\ui
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
2016-11-11 16:49:27 +01:00
|
|
|
|
2016-11-09 18:35:03 +01:00
|
|
|
wget https://s3.amazonaws.com/lbry-ui/development/data.json -OutFile lbrynet\resources\ui\data.json
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
}
|
|
|
|
|
2016-11-16 01:56:51 +01:00
|
|
|
function SetBuild([string]$build) {
|
|
|
|
(Get-Content lbrynet\build_type.py).replace('dev', $build) | Set-Content lbrynet\build_type.py
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
}
|
|
|
|
|
2016-11-11 16:49:27 +01:00
|
|
|
If (${Env:APPVEYOR_REPO_TAG} -NotMatch "true") {
|
|
|
|
C:\Python27\python.exe packaging\append_sha_to_version.py lbrynet\__init__.py ${Env:APPVEYOR_REPO_COMMIT}
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
|
|
|
|
AddUi
|
2016-11-16 01:56:51 +01:00
|
|
|
SetBuild "qa"
|
2016-11-11 16:49:27 +01:00
|
|
|
}
|
2016-11-16 05:01:20 +01:00
|
|
|
ElseIf (${Env:APPVEYOR_REPO_TAG_NAME} -Match "v\d+\.\d+\.\d+rc\d+") {
|
|
|
|
# If the tag looks like v0.7.6rc0 then this is a tagged release candidate.
|
2016-11-11 16:49:27 +01:00
|
|
|
AddUi
|
2016-11-16 01:56:51 +01:00
|
|
|
SetBuild "rc"
|
|
|
|
}
|
|
|
|
Else {
|
|
|
|
SetBuild "release"
|
2016-11-11 16:49:27 +01:00
|
|
|
}
|
|
|
|
|
2016-11-09 18:35:03 +01:00
|
|
|
C:\Python27\python.exe setup.py build bdist_msi
|
|
|
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
|
|
|
|
|
|
|
signtool.exe sign /f packaging\windows\certs\lbry2.pfx /p %key_pass% /tr http://tsa.starfieldtech.com /td SHA256 /fd SHA256 dist\*.msi
|