Versioning
This commit is contained in:
@ -1,12 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<PackageVersion>1.0.1</PackageVersion>
|
||||||
|
<Version>0.1.0</Version>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
|
<AssemblyVersion>0.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.0.0</FileVersion>
|
||||||
|
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.1"/>
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -10,8 +10,6 @@ namespace isn
|
|||||||
public partial class Program
|
public partial class Program
|
||||||
{
|
{
|
||||||
|
|
||||||
public static IEnumerable<IsnSourceSettings> Sources { get; protected set; }
|
|
||||||
|
|
||||||
public static void LoadConfig()
|
public static void LoadConfig()
|
||||||
{
|
{
|
||||||
FileInfo cfgSettingIf = new FileInfo(_configFileName);
|
FileInfo cfgSettingIf = new FileInfo(_configFileName);
|
||||||
@ -19,11 +17,11 @@ namespace isn
|
|||||||
{
|
{
|
||||||
var json = File.ReadAllText(cfgSettingIf.FullName);
|
var json = File.ReadAllText(cfgSettingIf.FullName);
|
||||||
settings = JsonConvert.DeserializeObject<Settings>(json);
|
settings = JsonConvert.DeserializeObject<Settings>(json);
|
||||||
source = settings.DefaultSource;
|
currentSource = settings.DefaultSource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static OptionSet storeoptions = new OptionSet {
|
static OptionSet storeoptions = new OptionSet {
|
||||||
{ "s|source=", "use source", val => source = source ?? val },
|
{ "s|source=", "use source", val => currentSource = currentSource ?? val },
|
||||||
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
||||||
};
|
};
|
||||||
private static string _configFileName =
|
private static string _configFileName =
|
||||||
@ -41,7 +39,7 @@ namespace isn
|
|||||||
static OptionSet pushoptions = new OptionSet {
|
static OptionSet pushoptions = new OptionSet {
|
||||||
{ "k|api-key=", "use api key", val => apiKey = apiKey ?? val },
|
{ "k|api-key=", "use api key", val => apiKey = apiKey ?? val },
|
||||||
{ "p|store-api-key", "store used api key (=<true|false>)", val => storApiKey = val != null },
|
{ "p|store-api-key", "store used api key (=<true|false>)", val => storApiKey = val != null },
|
||||||
{ "s|source=", "use source", val => source = source ?? val },
|
{ "s|source=", "use source", val => currentSource = currentSource ?? val },
|
||||||
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
{ "h|help", "show this message and exit", h => shouldShowPushHelp = h != null },
|
||||||
};
|
};
|
||||||
static OptionSet sourceoptions = new OptionSet {
|
static OptionSet sourceoptions = new OptionSet {
|
||||||
@ -56,7 +54,7 @@ namespace isn
|
|||||||
private static bool shouldShowSourceHelp;
|
private static bool shouldShowSourceHelp;
|
||||||
private static bool shouldShowPushHelp;
|
private static bool shouldShowPushHelp;
|
||||||
private static string apiKey = null;
|
private static string apiKey = null;
|
||||||
private static string source = null;
|
private static string currentSource = null;
|
||||||
private static int pushKO = 0;
|
private static int pushKO = 0;
|
||||||
private static bool storApiKey = false;
|
private static bool storApiKey = false;
|
||||||
public static IDataProtector Protector { get; set; } = new DefaultDataProtector();
|
public static IDataProtector Protector { get; set; } = new DefaultDataProtector();
|
||||||
@ -166,7 +164,7 @@ namespace isn
|
|||||||
pushoptions.WriteOptionDescriptions(Console.Out);
|
pushoptions.WriteOptionDescriptions(Console.Out);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<PushReport> reports = await PushPkgAsync(pargs);
|
List<PushReport> reports = PushPkg(pargs);
|
||||||
Console.WriteLine(JsonConvert.SerializeObject(reports));
|
Console.WriteLine(JsonConvert.SerializeObject(reports));
|
||||||
pushKO = reports.Count(r => !r.OK && !r.AlreadyPresent);
|
pushKO = reports.Count(r => !r.OK && !r.AlreadyPresent);
|
||||||
}
|
}
|
||||||
|
@ -10,15 +10,16 @@ namespace isn
|
|||||||
{
|
{
|
||||||
public static class SourceHelpers
|
public static class SourceHelpers
|
||||||
{
|
{
|
||||||
public static async Task<ApiIndexViewModel> GetServerResourcesAsync(string url)
|
public static ApiIndexViewModel GetServerResources(string url)
|
||||||
{
|
{
|
||||||
HttpClient client = new HttpClient();
|
HttpClient client = new HttpClient();
|
||||||
ApiIndexViewModel result = null;
|
ApiIndexViewModel result = null;
|
||||||
// var json = await client.GetStringAsync(new System.Uri(url));
|
// var json = await client.GetStringAsync(new System.Uri(url));
|
||||||
|
|
||||||
|
Task.Run(async ()=> {
|
||||||
var response = await client.GetStringAsync(url);
|
var response = await client.GetStringAsync(url);
|
||||||
result = JsonConvert.DeserializeObject<ApiIndexViewModel>(response);
|
result = JsonConvert.DeserializeObject<ApiIndexViewModel>(response);
|
||||||
|
}).Wait();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -9,17 +9,17 @@ namespace isn
|
|||||||
{
|
{
|
||||||
public class PushCommand
|
public class PushCommand
|
||||||
{
|
{
|
||||||
static public async Task<PushReport> RunAsync(string pkg, string source)
|
static public PushReport Run(string pkg, string source)
|
||||||
{
|
{
|
||||||
if (source == null) source = Program.Settings.DefaultSource;
|
if (source == null) source = Program.Settings.DefaultSource;
|
||||||
if (source == null) throw new InvalidOperationException("source is null");
|
if (source == null) throw new InvalidOperationException("source is null");
|
||||||
string apikey = Program.Protector.UnProtect(Program.Settings.Sources[source].ApiKey);
|
string apikey = Program.Protector.UnProtect(Program.Settings.Sources[source].ApiKey);
|
||||||
var resources = await SourceHelpers.GetServerResourcesAsync(source);
|
var resources = SourceHelpers.GetServerResources(source);
|
||||||
if (resources.Resources == null)
|
if (resources.Resources == null)
|
||||||
throw new InvalidOperationException("source gave no resource");
|
throw new InvalidOperationException("source gave no resource");
|
||||||
if (!resources.Resources.Any(res => res.Type == "PackagePublish/3.5.0"))
|
if (!resources.Resources.Any(res => res.Type == "PackagePublish/2.0.0"))
|
||||||
throw new InvalidOperationException("Source won't serve the expected push command");
|
throw new InvalidOperationException("Source won't serve the expected push command");
|
||||||
var pubRes = resources.Resources.First(res => res.Type == "PackagePublish/3.5.0");
|
var pubRes = resources.Resources.First(res => res.Type == "PackagePublish/2.0.0");
|
||||||
FileInfo fi = new FileInfo(pkg);
|
FileInfo fi = new FileInfo(pkg);
|
||||||
if (!fi.Exists)
|
if (!fi.Exists)
|
||||||
{
|
{
|
||||||
|
@ -9,13 +9,13 @@ namespace isn
|
|||||||
|
|
||||||
partial class Program
|
partial class Program
|
||||||
{
|
{
|
||||||
public static async Task<List<PushReport>> PushPkgAsync(IEnumerable<string> pkgs)
|
public static List<PushReport> PushPkg(IEnumerable<string> pkgs)
|
||||||
{
|
{
|
||||||
List<PushReport> pushReports = new List<PushReport>();
|
List<PushReport> pushReports = new List<PushReport>();
|
||||||
|
|
||||||
foreach (string pkg in pkgs)
|
foreach (string pkg in pkgs)
|
||||||
{
|
{
|
||||||
var report = await PushCommand.RunAsync(pkg, source);
|
var report = PushCommand.Run(pkg, currentSource);
|
||||||
|
|
||||||
pushReports.Add(report);
|
pushReports.Add(report);
|
||||||
}
|
}
|
||||||
|
@ -28,34 +28,34 @@ namespace isn
|
|||||||
|
|
||||||
public static void EnsureKeyStored()
|
public static void EnsureKeyStored()
|
||||||
{
|
{
|
||||||
if (source == null)
|
if (currentSource == null)
|
||||||
{
|
{
|
||||||
if (Settings.DefaultSource == null)
|
if (Settings.DefaultSource == null)
|
||||||
return;
|
return;
|
||||||
source = Settings.DefaultSource;
|
currentSource = Settings.DefaultSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.Sources.ContainsKey(source))
|
if (Settings.Sources.ContainsKey(currentSource))
|
||||||
{
|
{
|
||||||
if (apiKey == null)
|
if (apiKey == null)
|
||||||
{
|
{
|
||||||
// Une suppression
|
// Une suppression
|
||||||
Settings.Sources.Remove(source);
|
Settings.Sources.Remove(currentSource);
|
||||||
if (Settings.DefaultSource == source) Settings.DefaultSource = null;
|
if (Settings.DefaultSource == currentSource) Settings.DefaultSource = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Une mise À jour
|
// Une mise À jour
|
||||||
string ptd = Protector.Protect(apiKey);
|
string ptd = Protector.Protect(apiKey);
|
||||||
Settings.Sources[source].ApiKey = ptd;
|
Settings.Sources[currentSource].ApiKey = ptd;
|
||||||
if (Settings.DefaultSource == null) Settings.DefaultSource = source;
|
if (Settings.DefaultSource == null) Settings.DefaultSource = currentSource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (apiKey != null)
|
else if (apiKey != null)
|
||||||
{
|
{
|
||||||
// une addition
|
// une addition
|
||||||
string ptd = Protector.Protect(apiKey);
|
string ptd = Protector.Protect(apiKey);
|
||||||
Settings.Sources.Add(source, new SourceSettings { ApiKey = ptd });
|
Settings.Sources.Add(currentSource, new SourceSettings { ApiKey = ptd });
|
||||||
}
|
}
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<RootNamespace>nuget_cli</RootNamespace>
|
<RootNamespace>nuget_cli</RootNamespace>
|
||||||
<UserSecretsId>45b74c62-05bc-4603-95b4-3e80ae2fdf50</UserSecretsId>
|
<UserSecretsId>45b74c62-05bc-4603-95b4-3e80ae2fdf50</UserSecretsId>
|
||||||
|
<Version>0.1.0</Version>
|
||||||
<PackageVersion>1.0.1</PackageVersion>
|
<PackageVersion>1.0.1</PackageVersion>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
||||||
<IsTool>true</IsTool>
|
<IsTool>true</IsTool>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
|
<AssemblyVersion>0.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.0.0</FileVersion>
|
||||||
|
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Mono.Options" Version="5.3.0" />
|
<PackageReference Include="Mono.Options" Version="5.3.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
@ -19,9 +21,7 @@
|
|||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
<Reference Include="System.Net.Http" Version="4.0.0" />
|
<Reference Include="System.Net.Http" Version="4.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -5,6 +5,8 @@ using isnd.Data;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using isnd.ViewModels;
|
using isnd.ViewModels;
|
||||||
using Unleash;
|
using Unleash;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
namespace isnd.Controllers
|
namespace isnd.Controllers
|
||||||
{
|
{
|
||||||
@ -23,6 +25,7 @@ namespace isnd.Controllers
|
|||||||
|
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
|
|
||||||
return View(new HomeIndexViewModel{
|
return View(new HomeIndexViewModel{
|
||||||
PkgCount = _dbContext.Packages.Count(),
|
PkgCount = _dbContext.Packages.Count(),
|
||||||
UnleashClient = _unleashĈlient
|
UnleashClient = _unleashĈlient
|
||||||
@ -39,6 +42,11 @@ namespace isnd.Controllers
|
|||||||
public IActionResult Contact()
|
public IActionResult Contact()
|
||||||
{
|
{
|
||||||
ViewData["Message"] = "Your contact page.";
|
ViewData["Message"] = "Your contact page.";
|
||||||
|
var ass = typeof(isn.Abstract.Resource).GetType().Assembly;
|
||||||
|
var attrs = ass.GetCustomAttributes(true);
|
||||||
|
// ass.GetCustomAttributes(true);
|
||||||
|
System.Reflection.AssemblyFileVersionAttribute v = (AssemblyFileVersionAttribute)
|
||||||
|
GetType().Assembly.GetCustomAttribute(typeof(AssemblyFileVersionAttribute));
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
@ -56,3 +64,6 @@ namespace isnd.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
9
src/isnd/Helpers/SiteHelpers.cs
Normal file
9
src/isnd/Helpers/SiteHelpers.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace isnd.Helpers
|
||||||
|
{
|
||||||
|
public static class SiteHelpers
|
||||||
|
{
|
||||||
|
public static string SemVer {
|
||||||
|
get => GitVersionInformation.SemVer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -40,8 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="border-top footer text-muted">
|
<footer class="border-top footer text-muted">
|
||||||
<div class="container">
|
© 2021 - isn <span>@SiteHelpers.SemVer</span>- <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||||
© 2021 - isn - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
<!-- <script src="/lib/jquery/dist/jquery.slim.min.js" ></script>
|
<!-- <script src="/lib/jquery/dist/jquery.slim.min.js" ></script>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
@using isnd.Data
|
@using isnd.Data
|
||||||
@using isnd.ViewModels
|
@using isnd.ViewModels
|
||||||
|
@using isnd.Helpers
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@ -1,42 +1,42 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
|
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
|
||||||
<PackageVersion>1.0.1</PackageVersion>
|
<PackageVersion>1.0.1</PackageVersion>
|
||||||
|
<Version>0.1.0</Version>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
|
<AssemblyVersion>0.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.0.0</FileVersion>
|
||||||
|
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.1.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.1.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.1.1" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.All" />
|
<PackageReference Include="Microsoft.AspNetCore.All" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
<PackageReference Include="NuGet.Packaging.Core" Version="5.9.0"/>
|
<PackageReference Include="NuGet.Packaging.Core" Version="5.9.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.1" />
|
||||||
|
|
||||||
<PackageReference Include="MailKit" Version="2.11.1" />
|
<PackageReference Include="MailKit" Version="2.11.1" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.1" IncludeAssets="All" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.1" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" IncludeAssets="All" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" IncludeAssets="All" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.1" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
|
||||||
<PackageReference Include="unleash.client" Version="1.6.1" />
|
<PackageReference Include="unleash.client" Version="1.6.1" />
|
||||||
|
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
|
||||||
|
<PrivateAssets>All</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
|
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.1" />
|
||||||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" />
|
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE"/>
|
<None Include="..\..\LICENSE" Pack="true" PackagePath="LICENSE" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -57,19 +57,19 @@ dataTable.Rows.Add(dataRow);
|
|||||||
Assert.NotNull(vm.Resources);
|
Assert.NotNull(vm.Resources);
|
||||||
}
|
}
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task TestPush()
|
public void TestPush()
|
||||||
{
|
{
|
||||||
Program.LoadConfig();
|
Program.LoadConfig();
|
||||||
var report = await Program.PushPkgAsync(new string[] { "/home/paul/Nupkgs/Yavsc.Abstract.1.0.8.nupkg" });
|
var report = Program.PushPkg(new string[] { "/home/paul/Nupkgs/Yavsc.Abstract.1.0.8.nupkg" });
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task GetServerResourcesUsingHttpClientAsyncTest()
|
public async Task GetServerResourcesUsingHttpClientAsyncTest()
|
||||||
{
|
{
|
||||||
var model = await SourceHelpers.GetServerResourcesAsync("Http://isn.pschneider.fr/index.json");
|
var model = SourceHelpers.GetServerResources("Http://isn.pschneider.fr/index.json");
|
||||||
Console.WriteLine(JsonConvert.SerializeObject(model));
|
Console.WriteLine(JsonConvert.SerializeObject(model));
|
||||||
Assert.NotNull(model.Resources);
|
Assert.NotNull(model.Resources);
|
||||||
var pub = model.Resources.FirstOrDefault((r) => r.Type == "PackagePublish/3.5.0");
|
var pub = model.Resources.FirstOrDefault((r) => r.Type.StartsWith("PackagePublish/"));
|
||||||
Assert.True(pub!=null);
|
Assert.True(pub!=null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
|
<AssemblyVersion>0.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.0.0</FileVersion>
|
||||||
|
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
|
||||||
|
<Version>0.1.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||||
|
|
||||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
|
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All" />
|
||||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All"/>
|
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\isn\isn.csproj" />
|
<ProjectReference Include="..\..\src\isn\isn.csproj" />
|
||||||
<Reference Include="System.Net.Http" />
|
<Reference Include="System.Net.Http" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -1,13 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<UserSecretsId>d7144e46-4e63-4391-ba86-64b61f6e7be4</UserSecretsId>
|
<UserSecretsId>d7144e46-4e63-4391-ba86-64b61f6e7be4</UserSecretsId>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
|
<AssemblyVersion>0.1.0.0</AssemblyVersion>
|
||||||
|
<FileVersion>0.1.0.0</FileVersion>
|
||||||
|
<InformationalVersion>0.1.0+171.Branch.main.Sha.328f6f166a68b3e44ada08e9a13dd12570238679</InformationalVersion>
|
||||||
|
<Version>0.1.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
|
||||||
@ -15,20 +16,16 @@
|
|||||||
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
|
||||||
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.reporters" Version="2.4.1" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
|
||||||
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All"/>
|
<PackageToolReference Include="xunit.runner.console" Version="2.4.1" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\isnd\isnd.csproj" />
|
<ProjectReference Include="..\..\src\isnd\isnd.csproj" />
|
||||||
<ProjectReference Include="..\..\src\isn\isn.csproj" />
|
<ProjectReference Include="..\..\src\isn\isn.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MyTestingConfigFiles Include="appsettings.Testing.json"/>
|
<MyTestingConfigFiles Include="appsettings.Testing.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Target Name="CopyTestConfig">
|
<Target Name="CopyTestConfig">
|
||||||
<Copy
|
<Copy SourceFiles="@(MyTestingConfigFiles)" DestinationFolder="bin\Debug\net6.0" />
|
||||||
SourceFiles="@(MyTestingConfigFiles)"
|
</Target>
|
||||||
DestinationFolder="bin\Debug\net6.0"
|
|
||||||
/>
|
|
||||||
</Target>
|
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user