BililiveRecorder/CI/appveyor_install.ps1

19 lines
892 B
PowerShell
Raw Normal View History

2018-11-09 10:50:37 +08:00
Write-Host "Current build configuration is $env:CONFIGURATION"
2018-11-09 09:46:24 +08:00
if ($env:APPVEYOR -and (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) -and $env:CONFIGURATION -eq "Release") {
2018-04-14 07:05:25 +08:00
git config --global credential.helper store
Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:github_access_token):x-oauth-basic@github.com`n"
git config --global user.email "appveyor@genteure.com"
git config --global user.name "Appveyor(Genteure)"
git config --global core.autocrlf false
2018-11-09 08:30:08 +08:00
Update-AppveyorBuild -Version "$(Get-Content VERSION -Raw)"
2018-04-14 07:05:25 +08:00
2018-11-09 08:30:08 +08:00
$env:DEPLOY_SITE_GIT="C:\projects\site"
git clone --quiet --depth 1 "https://github.com/Bililive/soft.danmuji.org.git" $env:DEPLOY_SITE_GIT
$env:DEPLOY_SITE_BRANCH="rec$env:APPVEYOR_BUILD_VERSION"
2018-11-09 09:46:24 +08:00
git checkout --quiet -b $env:DEPLOY_SITE_BRANCH
2018-04-14 07:05:25 +08:00
}
2018-11-09 08:30:08 +08:00
Write-Host "Current build version is $env:APPVEYOR_BUILD_VERSION"