WIP
This commit is contained in:
@ -25,7 +25,7 @@ dotnet build /restore -c Release
|
|||||||
dotnet publish -c Release
|
dotnet publish -c Release
|
||||||
````
|
````
|
||||||
|
|
||||||
### Déployer le serveur
|
### Déploiement
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
sudo mkdir -p /srv/www/isnd
|
sudo mkdir -p /srv/www/isnd
|
||||||
@ -44,14 +44,14 @@ sudo systemctl daemon-reload
|
|||||||
sudo systemctl start isnd
|
sudo systemctl start isnd
|
||||||
````
|
````
|
||||||
|
|
||||||
* Activer le serveur :
|
* Activation du serveur :
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
sudo systemctl enable isnd
|
sudo systemctl enable isnd
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|
||||||
### Installer le client
|
### Installation du client
|
||||||
|
|
||||||
````bash
|
````bash
|
||||||
sudo mkdir /usr/local/lib/isn
|
sudo mkdir /usr/local/lib/isn
|
||||||
@ -74,7 +74,7 @@ sudo systemctl start isnd
|
|||||||
sudo cp -a src/isn/bin/Release/netcoreapp2.1/* /usr/local/lib/isn
|
sudo cp -a src/isn/bin/Release/netcoreapp2.1/* /usr/local/lib/isn
|
||||||
sudo chown -R root.root /usr/local/lib/isn
|
sudo chown -R root.root /usr/local/lib/isn
|
||||||
````
|
````
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<PackageVersion>1.0.1</PackageVersion>
|
<PackageVersion>1.0.1</PackageVersion>
|
||||||
<Version>1.0.5</Version>
|
<Version>1.0.5</Version>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
|
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
<AssemblyVersion>1.0.5.0</AssemblyVersion>
|
<AssemblyVersion>1.0.5.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.5.0</FileVersion>
|
<FileVersion>1.0.5.0</FileVersion>
|
||||||
|
@ -103,7 +103,7 @@ namespace isnd.Controllers
|
|||||||
Id = pkgid,
|
Id = pkgid,
|
||||||
Description = pkgdesc,
|
Description = pkgdesc,
|
||||||
OwnerId = apikey.UserId,
|
OwnerId = apikey.UserId,
|
||||||
LatestVersion = commit
|
LatestVersion = commit,
|
||||||
};
|
};
|
||||||
dbContext.Packages.Add(pkg);
|
dbContext.Packages.Add(pkg);
|
||||||
}
|
}
|
||||||
@ -143,6 +143,7 @@ namespace isnd.Controllers
|
|||||||
foreach (var v in pkgvers.ToArray())
|
foreach (var v in pkgvers.ToArray())
|
||||||
dbContext.PackageVersions.Remove(v);
|
dbContext.PackageVersions.Remove(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME default type or null
|
// FIXME default type or null
|
||||||
if (types==null || types.Count==0)
|
if (types==null || types.Count==0)
|
||||||
dbContext.PackageVersions.Add
|
dbContext.PackageVersions.Add
|
||||||
@ -152,6 +153,7 @@ namespace isnd.Controllers
|
|||||||
Major = version.Major,
|
Major = version.Major,
|
||||||
Minor = version.Minor,
|
Minor = version.Minor,
|
||||||
Patch = version.Patch,
|
Patch = version.Patch,
|
||||||
|
Revision = version.Revision,
|
||||||
IsPrerelease = version.IsPrerelease,
|
IsPrerelease = version.IsPrerelease,
|
||||||
FullString = version.ToFullString(),
|
FullString = version.ToFullString(),
|
||||||
Type = null,
|
Type = null,
|
||||||
|
@ -25,6 +25,15 @@ namespace isnd.Data.Catalog
|
|||||||
public RegistrationPageIndex(string id, IEnumerable<RegistrationLeaf> leaves) : this(id)
|
public RegistrationPageIndex(string id, IEnumerable<RegistrationLeaf> leaves) : this(id)
|
||||||
{
|
{
|
||||||
// leaves;
|
// leaves;
|
||||||
|
this.Items = new List<RegistrationPage>
|
||||||
|
(
|
||||||
|
|
||||||
|
|
||||||
|
)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("count")]
|
[JsonProperty("count")]
|
||||||
|
@ -54,7 +54,7 @@ namespace isnd.Data.Packages
|
|||||||
public RegistrationLeaf ToLeave(string bid)
|
public RegistrationLeaf ToLeave(string bid)
|
||||||
{
|
{
|
||||||
if (Versions.Count == 0) throw new Exception("NO VERSION");
|
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
|
RegistrationLeaf leave = new RegistrationLeaf
|
||||||
{
|
{
|
||||||
Id = bid + Id + "/" + v.FullString + ".json",
|
Id = bid + Id + "/" + v.FullString + ".json",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using isn.abst;
|
using isn.abst;
|
||||||
@ -24,6 +25,8 @@ namespace isnd.Data
|
|||||||
[Required]
|
[Required]
|
||||||
public int Patch { get; set; }
|
public int Patch { get; set; }
|
||||||
|
|
||||||
|
public int Revision { get; set; }
|
||||||
|
|
||||||
[StringLength(256)]
|
[StringLength(256)]
|
||||||
[Required][Key]
|
[Required][Key]
|
||||||
public string FullString { get; set; }
|
public string FullString { get; set; }
|
||||||
@ -50,5 +53,7 @@ namespace isnd.Data
|
|||||||
+ Constants.SpecFileEstension;
|
+ Constants.SpecFileEstension;
|
||||||
|
|
||||||
public string SementicVersionString { get => $"{Major}.{Minor}.{Patch}"; }
|
public string SementicVersionString { get => $"{Major}.{Minor}.{Patch}"; }
|
||||||
|
public Version SystemVersion { get => new Version(Major, Minor, Patch, Revision); }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ namespace isnd
|
|||||||
Configuration = config;
|
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.
|
// This method gets called by the runtime. Use this method to add services to the container.
|
||||||
public void ConfigureServices(IServiceCollection services)
|
public void ConfigureServices(IServiceCollection services)
|
||||||
@ -115,7 +115,6 @@ namespace isnd
|
|||||||
|
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
app.UseMigrationsEndPoint();
|
app.UseMigrationsEndPoint();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
|
|
||||||
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
|
<UserSecretsId>85fd766d-5d23-4476-aed1-463b2942e86a</UserSecretsId>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
<PackageLicenseExpression>WTFPL</PackageLicenseExpression>
|
||||||
@ -14,16 +13,16 @@
|
|||||||
<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.6" />
|
<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.All" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
<PackageReference Include="NuGet.Packaging.Core" Version="5.6.0" />
|
<PackageReference Include="NuGet.Packaging.Core" Version="5.6.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.30" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.1.30" />
|
||||||
<PackageReference Include="MailKit" Version="2.8.0" />
|
<PackageReference Include="MailKit" Version="2.8.0" />
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" IncludeAssets="All" />
|
<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.EntityFrameworkCore.Design" Version="2.1.2" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.10" IncludeAssets="All" />
|
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.3" IncludeAssets="All" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.14" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.2" />
|
||||||
<PackageReference Include="unleash.client" Version="1.6.1" />
|
<PackageReference Include="unleash.client" Version="1.6.1" />
|
||||||
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
|
<PackageReference Include="GitVersion.MsBuild" Version="5.6.10*">
|
||||||
<PrivateAssets>All</PrivateAssets>
|
<PrivateAssets>All</PrivateAssets>
|
||||||
@ -35,7 +34,7 @@
|
|||||||
<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.14" />
|
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.2" />
|
||||||
<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>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<NoWarn>NETSDK1138</NoWarn>
|
<NoWarn>NETSDK1138</NoWarn>
|
||||||
<AssemblyVersion>1.0.5.0</AssemblyVersion>
|
<AssemblyVersion>1.0.5.0</AssemblyVersion>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
|
||||||
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
|
|
||||||
<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>
|
||||||
|
Reference in New Issue
Block a user