diff --git a/README.md b/README.md index ceadb5d..e4c60ba 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/isn.abst/isn.abst.csproj b/src/isn.abst/isn.abst.csproj index db4c062..69192d4 100644 --- a/src/isn.abst/isn.abst.csproj +++ b/src/isn.abst/isn.abst.csproj @@ -3,7 +3,6 @@ 1.0.1 1.0.5 netcoreapp2.1 - linux-x64 NETSDK1138 1.0.5.0 1.0.5.0 diff --git a/src/isnd/Controllers/Packages/Put.cs b/src/isnd/Controllers/Packages/Put.cs index 103f82a..d184d14 100644 --- a/src/isnd/Controllers/Packages/Put.cs +++ b/src/isnd/Controllers/Packages/Put.cs @@ -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, diff --git a/src/isnd/Data/Catalog/RegistrationPageIndex.cs b/src/isnd/Data/Catalog/RegistrationPageIndex.cs index f08b2e3..bb188f5 100644 --- a/src/isnd/Data/Catalog/RegistrationPageIndex.cs +++ b/src/isnd/Data/Catalog/RegistrationPageIndex.cs @@ -25,6 +25,15 @@ namespace isnd.Data.Catalog public RegistrationPageIndex(string id, IEnumerable leaves) : this(id) { // leaves; + this.Items = new List + ( + + + ) + { + + + }; } [JsonProperty("count")] diff --git a/src/isnd/Data/Packages/Package.cs b/src/isnd/Data/Packages/Package.cs index 6940003..85f0161 100644 --- a/src/isnd/Data/Packages/Package.cs +++ b/src/isnd/Data/Packages/Package.cs @@ -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", diff --git a/src/isnd/Data/Packages/PackageVersion.cs b/src/isnd/Data/Packages/PackageVersion.cs index a448261..53e4207 100644 --- a/src/isnd/Data/Packages/PackageVersion.cs +++ b/src/isnd/Data/Packages/PackageVersion.cs @@ -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); } + } } \ No newline at end of file diff --git a/src/isnd/Startup.cs b/src/isnd/Startup.cs index b583243..72cfaec 100644 --- a/src/isnd/Startup.cs +++ b/src/isnd/Startup.cs @@ -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) diff --git a/src/isnd/isnd.csproj b/src/isnd/isnd.csproj index 21e2d71..8debd22 100644 --- a/src/isnd/isnd.csproj +++ b/src/isnd/isnd.csproj @@ -1,7 +1,6 @@  netcoreapp2.1 - linux-x64 85fd766d-5d23-4476-aed1-463b2942e86a true WTFPL @@ -14,16 +13,16 @@ - + - - - + + + All @@ -35,7 +34,7 @@ - + diff --git a/test/isn.tests/isn.tests.csproj b/test/isn.tests/isn.tests.csproj index d19ccdb..5012d88 100644 --- a/test/isn.tests/isn.tests.csproj +++ b/test/isn.tests/isn.tests.csproj @@ -1,7 +1,6 @@  netcoreapp2.1 - linux-x64 false NETSDK1138 1.0.5.0 diff --git a/test/isnd.tests/isnd.tests.csproj b/test/isnd.tests/isnd.tests.csproj index 307598d..19cc089 100644 --- a/test/isnd.tests/isnd.tests.csproj +++ b/test/isnd.tests/isnd.tests.csproj @@ -1,7 +1,6 @@  netcoreapp2.1 - linux-x64 false d7144e46-4e63-4391-ba86-64b61f6e7be4 NETSDK1138