From 879cd97a1e44b3f7ac6719803c4d2809e4cc23dd Mon Sep 17 00:00:00 2001 From: Genteure Date: Sun, 25 Mar 2018 11:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=B2=A1=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CI/build_clickonce.ps1 | 4 ++-- CI/push_clickonce.ps1 | 7 +++---- appveyor.yml | 3 ++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CI/build_clickonce.ps1 b/CI/build_clickonce.ps1 index 0b3d611..3e0cb88 100644 --- a/CI/build_clickonce.ps1 +++ b/CI/build_clickonce.ps1 @@ -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) } \ No newline at end of file diff --git a/CI/push_clickonce.ps1 b/CI/push_clickonce.ps1 index 92e6bbf..c5b9ab7 100644 --- a/CI/push_clickonce.ps1 +++ b/CI/push_clickonce.ps1 @@ -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 diff --git a/appveyor.yml b/appveyor.yml index 917e71a..b705765 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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