Ver Fonte

1. Diagnostics Http/https 上傳方式支援 HttpPost & HttpPut
2. 新增檔案版本號

Jessica Tseng há 3 anos atrás
pai
commit
64c26c2378

+ 1 - 0
EVCB_OCPP.WEBAPI/Controllers/FileController.cs

@@ -13,6 +13,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers
     [ApiExplorerSettings(IgnoreApi = true)]
     public class FileController : ApiController
     {
+        [HttpPut]
         [HttpPost]
         public  async Task<HttpResponseMessage> Upload()
         {

+ 3 - 0
EVCB_OCPP.WEBAPI/EVCB_OCPP.WEBAPI.csproj

@@ -406,6 +406,9 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
   </Target>
+  <PropertyGroup>
+    <PreBuildEvent>GitVersion.exe $(ProjectDir) /updateassemblyinfo</PreBuildEvent>
+  </PropertyGroup>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

+ 6 - 0
EVCB_OCPP.WEBAPI/GitVersion.yml

@@ -0,0 +1,6 @@
+assembly-versioning-scheme: MajorMinorPatch
+assembly-informational-format: '{ShortSha}'
+next-version: 0.1.0
+branches: {}
+ignore:
+  sha: []

+ 3 - 2
EVCB_OCPP.WEBAPI/Properties/AssemblyInfo.cs

@@ -31,5 +31,6 @@ using System.Runtime.InteropServices;
 //
 // 您可以指定所有值或預設修訂和組件數目
 // 指定為預設值:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+[assembly: AssemblyInformationalVersion("38cc493")]