应该没问题了

This commit is contained in:
Genteure 2018-03-25 11:24:34 +08:00
parent 7a6b02df05
commit 879cd97a1e
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
if ($env:APPVEYOR) {
msbuild "BililiveRecorder.sln" /t:Publish /verbosity:minimal /p:Configuration=Release /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild "BililiveRecorder.sln" /t:Publish /verbosity:minimal /p:Configuration=Release /p:ApplicationVersion="$env:p_version" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
}else {
msbuild "BililiveRecorder.sln" /t:Publish /verbosity:minimal /p:Configuration=Release
msbuild "BililiveRecorder.sln" /t:Publish /verbosity:minimal /p:Configuration=Release /p:ApplicationVersion="$env:p_version"
}
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }

View File

@ -1,9 +1,8 @@
if (-not (Test-Path env:APPVEYOR)) {
Throw New-Object System.NotSupportedException "Not Running on Appveyor!"
}
$env:old_script_path = (Get-Item -Path ".\" -Verbose).FullName
git clone --depth 1 https://github.com/Bililive/soft.danmuji.org.git C:\projects\site
Get-ChildItem -Path .\BililiveRecorder.WPF\bin\Release\app.publish | Copy-Item -Destination C:\projects\site\BililiveRecorder -Recurse -Container
git --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ add -A
git --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ commit -m 'BililiveRecorder $env:p_version'
git --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ push
git -q --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ add -A
git -q --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ commit -m "BililiveRecorder $env:p_version"
git -q --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ push

View File

@ -17,10 +17,11 @@ init:
- ps: 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
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
$env:p_version="$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v"))"
$env:p_version="$($env:APPVEYOR_REPO_TAG_NAME.TrimStart("v")).0"
Update-AppveyorBuild -Version "$env:p_version"
}
else