Merge branch 'broken/ef'

fixed-page-index
Paul Schneider 2 years ago
commit 9aac183e2c
10 changed files with 27 additions and 15 deletions

@ -25,7 +25,7 @@ dotnet build /restore -c Release
dotnet publish -c Release
````
### Déployer le serveur
### Déploiement
````bash
sudo mkdir -p /srv/www/isnd
@ -44,14 +44,14 @@ sudo systemctl daemon-reload
sudo systemctl start isnd
````
* Activer le serveur :
* Activation du serveur :
````bash
sudo systemctl enable isnd
````
### Installer le client
### Installation du client
````bash
sudo mkdir /usr/local/lib/isn

@ -3,7 +3,6 @@
<PackageVersion>1.0.1</PackageVersion>
<Version>1.0.5</Version>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<NoWarn>NETSDK1138</NoWarn>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<FileVersion>1.0.5.0</FileVersion>

@ -103,7 +103,7 @@ namespace isnd.Controllers
Id = pkgid,
Description = pkgdesc,
OwnerId = apikey.UserId,
LatestVersion = commit
LatestVersion = commit,
};
dbContext.Packages.Add(pkg);
}
@ -143,6 +143,7 @@ namespace isnd.Controllers
foreach (var v in pkgvers.ToArray())
dbContext.PackageVersions.Remove(v);
}
// FIXME default type or null
if (types==null || types.Count==0)
dbContext.PackageVersions.Add
@ -152,6 +153,7 @@ namespace isnd.Controllers
Major = version.Major,
Minor = version.Minor,
Patch = version.Patch,
Revision = version.Revision,
IsPrerelease = version.IsPrerelease,
FullString = version.ToFullString(),
Type = null,

@ -25,6 +25,15 @@ namespace isnd.Data.Catalog
public RegistrationPageIndex(string id, IEnumerable<RegistrationLeaf> leaves) : this(id)
{
// leaves;
this.Items = new List<RegistrationPage>
(
)
{
};
}
[JsonProperty("count")]

@ -54,7 +54,7 @@ namespace isnd.Data.Packages
public RegistrationLeaf ToLeave(string bid)
{
if (Versions.Count == 0) throw new Exception("NO VERSION");
var v = Versions.First();
var v = Versions.OrderBy(w => w.SystemVersion).First();
RegistrationLeaf leave = new RegistrationLeaf
{
Id = bid + Id + "/" + v.FullString + ".json",

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using isn.abst;
@ -24,6 +25,8 @@ namespace isnd.Data
[Required]
public int Patch { get; set; }
public int Revision { get; set; }
[StringLength(256)]
[Required][Key]
public string FullString { get; set; }
@ -50,5 +53,7 @@ namespace isnd.Data
+ Constants.SpecFileEstension;
public string SementicVersionString { get => $"{Major}.{Minor}.{Patch}"; }
public Version SystemVersion { get => new Version(Major, Minor, Patch, Revision); }
}
}

@ -27,7 +27,7 @@ namespace isnd
Configuration = config;
}
public IConfiguration Configuration { get; }
public static IConfiguration Configuration { get; private set; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
<IsPackable>true</IsPackable>
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
@ -14,16 +13,16 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.1.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.1.11" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.All" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NuGet.Packaging.Core" Version="5.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.30" />
<PackageReference Include="MailKit" Version="2.8.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" IncludeAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.14" IncludeAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.10" IncludeAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.2" IncludeAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.3" IncludeAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.2" />
<PackageReference Include="unleash.client" Version="1.6.1" />
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
<PrivateAssets>All</PrivateAssets>
@ -35,7 +34,7 @@
<ProjectReference Include="../isn.abst/isn.abst.csproj" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.14" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.2" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.1.0-preview1-final" />
</ItemGroup>
<ItemGroup>

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<IsPackable>false</IsPackable>
<NoWarn>NETSDK1138</NoWarn>
<AssemblyVersion>1.0.5.0</AssemblyVersion>

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<IsPackable>false</IsPackable>
<UserSecretsId>d7144e46-4e63-4391-ba86-64b61f6e7be4</UserSecretsId>
<NoWarn>NETSDK1138</NoWarn>

Loading…