diff options
author | Tommy Parnell <tparnell8@gmail.com> | 2017-05-28 13:11:25 -0700 |
---|---|---|
committer | Tommy Parnell <tparnell8@gmail.com> | 2017-05-28 13:11:25 -0700 |
commit | 2cf90883f7a6d49928dc87296384f8fcdf7e89a4 (patch) | |
tree | 54c9b498a58673331148d976cc8e85be7b49eb50 | |
parent | 691b73e6212f1e98a973e3eb3e9582101ba2c200 (diff) | |
download | Otp.NET-2cf90883f7a6d49928dc87296384f8fcdf7e89a4.zip Otp.NET-2cf90883f7a6d49928dc87296384f8fcdf7e89a4.tar.gz Otp.NET-2cf90883f7a6d49928dc87296384f8fcdf7e89a4.tar.bz2 |
update to new csproj
-rw-r--r-- | Otp.NET.nuspec | 18 | ||||
-rwxr-xr-x[-rw-r--r--] | Otp.NET.sln | 87 | ||||
-rw-r--r-- | build.cmd | 12 | ||||
-rw-r--r-- | global.json | 6 | ||||
-rw-r--r-- | gulpfile.js | 110 | ||||
-rw-r--r-- | package.json | 6 | ||||
-rwxr-xr-x | src/Otp.NET.UnitTests/Otp.NET.UnitTests.csproj | 17 | ||||
-rwxr-xr-x | src/Otp.NET.UnitTests/UnitTest1.cs | 14 | ||||
-rwxr-xr-x | src/Otp.NET/Otp.NET.csproj | 21 | ||||
-rw-r--r-- | src/Otp.NET/Otp.NET.xproj | 19 | ||||
-rw-r--r-- | src/Otp.NET/Properties/AssemblyInfo.cs | 3 | ||||
-rw-r--r-- | src/Otp.NET/project.json | 14 |
12 files changed, 167 insertions, 160 deletions
diff --git a/Otp.NET.nuspec b/Otp.NET.nuspec deleted file mode 100644 index d46c0c8..0000000 --- a/Otp.NET.nuspec +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?><package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> - <metadata> - <id>Otp.NET</id> - <version>1.0.1</version> - <authors>Kyle Spearrin</authors> - <projectUrl>https://github.com/kspearrin/Otp.NET</projectUrl> - <licenseUrl>https://raw.githubusercontent.com/kspearrin/Otp.NET/master/LICENSE.txt</licenseUrl> - <title>Otp.NET</title> - <description>An implementation of TOTP which is commonly used for multi factor authentication by using a shared key between the client and the server to generate and verify one time use codes. For documentation, visit https://github.com/kspearrin/Otp.NET</description> - <summary>An implementation of TOTP which is commonly used for multi factor authentication.</summary> - <tags>otp totp 2fa two factor</tags> - <iconUrl>http://i.imgur.com/XFfC64v.png</iconUrl> - </metadata> - <files> - <file src="src\Otp.NET\bin\Release\net45\Otp.NET.dll" target="lib\net45"/> - <file src="src\Otp.NET\bin\Release\netstandard1.3\Otp.NET.dll" target="lib\netstandard1.3"/> - </files> -</package>
\ No newline at end of file diff --git a/Otp.NET.sln b/Otp.NET.sln index 24d5e3b..f6bde00 100644..100755 --- a/Otp.NET.sln +++ b/Otp.NET.sln @@ -1,33 +1,54 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{57F82DBE-510A-4E78-ADCD-7A18DB80AA87}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E5579496-CD66-4961-8DD1-A53BA74229E3}" - ProjectSection(SolutionItems) = preProject - global.json = global.json - Otp.NET.nuspec = Otp.NET.nuspec - EndProjectSection -EndProject -Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Otp.NET", "src\Otp.NET\Otp.NET.xproj", "{E630B67F-150A-4978-A2DD-51B8D8E783EF}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E630B67F-150A-4978-A2DD-51B8D8E783EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E630B67F-150A-4978-A2DD-51B8D8E783EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E630B67F-150A-4978-A2DD-51B8D8E783EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E630B67F-150A-4978-A2DD-51B8D8E783EF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {E630B67F-150A-4978-A2DD-51B8D8E783EF} = {57F82DBE-510A-4E78-ADCD-7A18DB80AA87} - EndGlobalSection -EndGlobal +
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26124.0
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D0E9D08A-7F66-426A-8645-C2D92DB4D200}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Otp.NET", "src\Otp.NET\Otp.NET.csproj", "{EF104BCD-4F86-494E-81E1-D69A5C851430}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Otp.NET.UnitTests", "src\Otp.NET.UnitTests\Otp.NET.UnitTests.csproj", "{6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x64.ActiveCfg = Debug|x64
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x64.Build.0 = Debug|x64
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x86.ActiveCfg = Debug|x86
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Debug|x86.Build.0 = Debug|x86
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x64.ActiveCfg = Release|x64
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x64.Build.0 = Release|x64
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x86.ActiveCfg = Release|x86
+ {EF104BCD-4F86-494E-81E1-D69A5C851430}.Release|x86.Build.0 = Release|x86
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x64.ActiveCfg = Debug|x64
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x64.Build.0 = Debug|x64
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x86.ActiveCfg = Debug|x86
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Debug|x86.Build.0 = Debug|x86
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x64.ActiveCfg = Release|x64
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x64.Build.0 = Release|x64
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x86.ActiveCfg = Release|x86
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {EF104BCD-4F86-494E-81E1-D69A5C851430} = {D0E9D08A-7F66-426A-8645-C2D92DB4D200}
+ {6FE2E04E-9263-4CB6-B9C1-3E39E19979DF} = {D0E9D08A-7F66-426A-8645-C2D92DB4D200}
+ EndGlobalSection
+EndGlobal
@@ -2,18 +2,8 @@ cd %~dp0 SETLOCAL -SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe - -IF EXIST %CACHED_NUGET% goto copynuget -IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" - -:copynuget -IF EXIST .nuget\nuget.exe goto build -md .nuget -copy %CACHED_NUGET% .nuget\nuget.exe > nul :build -call npm install -g gulp +call npm install -g gulp-cli call npm install call gulp diff --git a/global.json b/global.json deleted file mode 100644 index 9d09ab5..0000000 --- a/global.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "projects": [ "src", "test" ], - "sdk": { - "version": "1.0.0-preview2-003131" - } -} diff --git a/gulpfile.js b/gulpfile.js index b2400b0..a4dfeac 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,52 +1,58 @@ -var p = require('./package.json'), - gulp = require('gulp'), - assemblyInfo = require('gulp-dotnet-assembly-info'), - xmlpoke = require('gulp-xmlpoke'), - msbuild = require('gulp-msbuild'), - nuget = require('nuget-runner')({ - apiKey: process.env.NUGET_API_KEY, - nugetPath: '.nuget/nuget.exe' - }); - -gulp.task('default', ['nuget']); - -gulp.task('restore', [], function () { - return nuget - .restore({ - packages: 'Otp.NET.sln', - verbosity: 'normal' - }); -}); - -gulp.task('build', ['restore'], function () { - return gulp - .src('Otp.NET.sln') - .pipe(msbuild({ - toolsVersion: 14.0, - targets: ['Clean', 'Build'], - errorOnFail: true, - configuration: 'Release' - })); -}); - -gulp.task('nuspec', ['build'], function () { - return gulp - .src('Otp.NET.nuspec') - .pipe(xmlpoke({ - replacements: [{ - xpath: "//package:version", - namespaces: { "package": "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" }, - value: p.version - }] - })) - .pipe(gulp.dest('.')); -}); - -gulp.task('nuget', ['nuspec'], function () { - return nuget - .pack({ - spec: 'Otp.NET.nuspec', - outputDirectory: 'src/Otp.NET/bin/Release', - version: p.version - }); -}); +var p = require('./package.json'); +var gulp = require('gulp'); +var path = require('path'); +var del = require('del'); +var version = p.version; +var configuration = process.env.BUILD_CONFIGURATION || 'Release'; +var {restore, build, test, pack, push} = require('gulp-dotnet-cli'); + +gulp.task('default', ['nuget', 'test']); + +gulp.task('clean', [], ()=>del(['output', 'src/**/bin', 'src/**/obj'])) + +gulp.task('restore', ['clean'], ()=>{ + + return gulp.src('**/*.sln') + .pipe(restore()); + +}, {read:false}); + +gulp.task('build', ['restore'], ()=>{ + + return gulp.src('**/*.sln') + .pipe(build({ + configuration: configuration, + version: version + })); + +}, {read:false}); + +gulp.task('test', ['build'], ()=>{ + + return gulp.src('**/*UnitTests.csproj') + .pipe(test({ + configuration: configuration, + noBuild: true + })); + +}, {read:false}); + +gulp.task('nuget', ['build'], ()=>{ + + return gulp.src('src/Otp.NET/Otp.NET.csproj') + .pipe(pack({ + version: p.version, + configuration: configuration, + output: path.resolve(__dirname, 'output') + })); + +}, {read:false}); + +gulp.task('push', ['nuget'], ()=>{ + + return gulp.src('output/**/*.nupkg') + .pipe(push({ + apiKey: process.env.NUGET_API_KEY + })); + +}, {read:false});
\ No newline at end of file diff --git a/package.json b/package.json index c3e62b9..66a07a9 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,8 @@ "url": "https://github.com/kspearrin/Otp.NET" }, "dependencies": { + "del": "^2.2.2", "gulp": "^3.9.0", - "gulp-dotnet-assembly-info": "^0.1.10", - "gulp-msbuild": "^0.2.11", - "gulp-xmlpoke": "^0.2.0", - "nuget-runner": "^0.1.5" + "gulp-dotnet-cli": "^0.3.0" } } diff --git a/src/Otp.NET.UnitTests/Otp.NET.UnitTests.csproj b/src/Otp.NET.UnitTests/Otp.NET.UnitTests.csproj new file mode 100755 index 0000000..27ec6e6 --- /dev/null +++ b/src/Otp.NET.UnitTests/Otp.NET.UnitTests.csproj @@ -0,0 +1,17 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>netcoreapp1.1</TargetFramework> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> + <PackageReference Include="xunit" Version="2.2.0" /> + <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\Otp.NET\Otp.NET.csproj" /> + </ItemGroup> + +</Project> diff --git a/src/Otp.NET.UnitTests/UnitTest1.cs b/src/Otp.NET.UnitTests/UnitTest1.cs new file mode 100755 index 0000000..7f2737c --- /dev/null +++ b/src/Otp.NET.UnitTests/UnitTest1.cs @@ -0,0 +1,14 @@ +using System;
+using Xunit;
+
+namespace Otp.NET.UnitTests
+{
+ public class UnitTest1
+ {
+ [Fact]
+ public void Test1()
+ {
+
+ }
+ }
+}
diff --git a/src/Otp.NET/Otp.NET.csproj b/src/Otp.NET/Otp.NET.csproj new file mode 100755 index 0000000..c9de44e --- /dev/null +++ b/src/Otp.NET/Otp.NET.csproj @@ -0,0 +1,21 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFrameworks>netstandard1.3;net45</TargetFrameworks> + <PackageId>Otp.NET</PackageId> + <Authors>Kyle Spearrin</Authors> + <PackageProjectUrl>https://github.com/kspearrin/Otp.NET</PackageProjectUrl> + <PackageLicenseUrl>https://raw.githubusercontent.com/kspearrin/Otp.NET/master/LICENSE.txt</PackageLicenseUrl> + <Title>Otp.NET</Title> + <Description>An implementation of TOTP which is commonly used for multi factor authentication by using a shared key between the client and the server to generate and verify one time use codes. For documentation, visit https://github.com/kspearrin/Otp.NET</Description> + <Summary>An implementation of TOTP which is commonly used for multi factor authentication.</Summary> + <PackageTags>otp,totp,2fa,two factor</PackageTags> + <PackageIconUrl>http://i.imgur.com/XFfC64v.png</PackageIconUrl> + </PropertyGroup> + + <ItemGroup Condition=" '$(TargetFramework)' == 'net45' "> + <Reference Include="System" /> + <Reference Include="Microsoft.CSharp" /> + </ItemGroup> + +</Project> diff --git a/src/Otp.NET/Otp.NET.xproj b/src/Otp.NET/Otp.NET.xproj deleted file mode 100644 index 5197c3e..0000000 --- a/src/Otp.NET/Otp.NET.xproj +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> - </PropertyGroup> - <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> - <PropertyGroup Label="Globals"> - <ProjectGuid>e630b67f-150a-4978-a2dd-51b8d8e783ef</ProjectGuid> - <RootNamespace>OtpNet</RootNamespace> - <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> - <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> - <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> - </PropertyGroup> - <PropertyGroup> - <SchemaVersion>2.0</SchemaVersion> - </PropertyGroup> - <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> -</Project>
\ No newline at end of file diff --git a/src/Otp.NET/Properties/AssemblyInfo.cs b/src/Otp.NET/Properties/AssemblyInfo.cs index d6dbf19..6a7ee22 100644 --- a/src/Otp.NET/Properties/AssemblyInfo.cs +++ b/src/Otp.NET/Properties/AssemblyInfo.cs @@ -5,9 +5,6 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Otp.NET")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible diff --git a/src/Otp.NET/project.json b/src/Otp.NET/project.json deleted file mode 100644 index 6657334..0000000 --- a/src/Otp.NET/project.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "1.0.1-*", - - "dependencies": { - "NETStandard.Library": "1.6.1" - }, - - "frameworks": { - "netstandard1.3": { - "imports": "dnxcore50" - }, - "net45": {} - } -}
\ No newline at end of file |