From 5dffb2aa8c121c1784a8bfe75651cbb6ab67ade7 Mon Sep 17 00:00:00 2001 From: fengyhack Date: Thu, 19 Jan 2017 16:19:38 +0800 Subject: [PATCH] travis-ci --- .travis.yml | 2 + Qiniu.Net40.Travis.sln | 22 +++++ README.md | 2 + src/Qiniu/Qiniu.Net40.Travis.csproj | 147 ++++++++++++++++++++++++++++ src/Qiniu/RSF/OperationManager.cs | 2 - 5 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 Qiniu.Net40.Travis.sln create mode 100644 src/Qiniu/Qiniu.Net40.Travis.csproj diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a749d2b7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: csharp +solution: Qiniu.Net40.Travis.sln \ No newline at end of file diff --git a/Qiniu.Net40.Travis.sln b/Qiniu.Net40.Travis.sln new file mode 100644 index 00000000..9c66b3f8 --- /dev/null +++ b/Qiniu.Net40.Travis.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qiniu.Net40", "src\Qiniu\Qiniu.Net40.Travis.csproj", "{2F5B0328-DE8B-4B53-A500-3077E340A51B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md index 11aaf2d0..3bcf0297 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ #Qiniu (Cloud) C# SDK +[![Build Status](https://api.travis-ci.org/qiniu/csharp-sdk.png?branch=master)](https://travis-ci.org/qiniu/csharp-sdk) + ##关于 此 C# SDK 适用于.NET Framework 2.0+ 和 .NET Core,基于七牛云API参考手册构建。使用此 SDK 构建您的网络应用程序,能让您以非常便捷地方式将数据安全地存储到七牛云存储上。无论您的网络应用是一个网站程序,还是包括从云端(服务端程序)到终端(手持设备应用)的架构的服务或应用,通过七牛云存储及其 SDK,都能让您应用程序的终端用户高速上传和下载,同时也让您的服务端更加轻盈。 diff --git a/src/Qiniu/Qiniu.Net40.Travis.csproj b/src/Qiniu/Qiniu.Net40.Travis.csproj new file mode 100644 index 00000000..8367440b --- /dev/null +++ b/src/Qiniu/Qiniu.Net40.Travis.csproj @@ -0,0 +1,147 @@ + + + + + Release + AnyCPU + {2F5B0328-DE8B-4B53-A500-3077E340A51B} + Library + Properties + Qiniu + Qiniu + v4.0 + 512 + + + + true + full + false + ..\..\bin\net40\obj + ..\..\bin\net40\ + DEBUG;TRACE;Net40 + prompt + 4 + false + ..\..\bin\net40\Qiniu.xml + + + pdbonly + true + ..\..\bin\net40\obj + ..\..\bin\net40\ + TRACE;Net40 + prompt + 4 + false + ..\..\bin\net40\Qiniu.xml + + + true + + + + + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net40\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Qiniu/RSF/OperationManager.cs b/src/Qiniu/RSF/OperationManager.cs index 7e38278f..74882c54 100644 --- a/src/Qiniu/RSF/OperationManager.cs +++ b/src/Qiniu/RSF/OperationManager.cs @@ -272,8 +272,6 @@ public HttpResult dfopData(string fop, string localFile) try { string dfopUrl = string.Format("{0}/dfop?fop={1}", Config.DFOP_API_HOST, fop); - string key = Path.GetFileName(localFile); - byte[] data = File.ReadAllBytes(localFile); string token = auth.createManageToken(dfopUrl); string boundary = HttpManager.createFormDataBoundary(); string sep = "--" + boundary;