registration and detail url's
This commit is contained in:
8
Makefile
8
Makefile
@ -23,17 +23,19 @@ packs: pack-isn pack-isnd pack-isn.abst
|
|||||||
|
|
||||||
clean: clean-isnd clean-isn clean-isn.abst
|
clean: clean-isnd clean-isn clean-isn.abst
|
||||||
|
|
||||||
|
TARGETFRAMEWORK=net8.0
|
||||||
|
|
||||||
server-update:
|
server-update:
|
||||||
dotnet build -c Release src/isnd
|
dotnet build -c Release src/isnd
|
||||||
dotnet publish -c Release -f net7.0 src/isnd
|
dotnet publish -c Release -f $(TARGETFRAMEWORK) src/isnd
|
||||||
sudo systemctl stop isnd
|
sudo systemctl stop isnd
|
||||||
sudo cp -a src/isnd/bin/Release/net7.0/publish/* /srv/www/isnd
|
sudo cp -a src/isnd/bin/Release/$(TARGETFRAMEWORK)/publish/* /srv/www/isnd
|
||||||
sudo systemctl start isnd
|
sudo systemctl start isnd
|
||||||
|
|
||||||
client-update:
|
client-update:
|
||||||
dotnet build -c Release src/isn
|
dotnet build -c Release src/isn
|
||||||
# MAJ du client
|
# MAJ du client
|
||||||
sudo cp -a src/isn/bin/Release/net7.0/* /usr/local/lib/isn
|
sudo cp -a src/isn/bin/Release/$(TARGETFRAMEWORK)/* /usr/local/lib/isn
|
||||||
sudo chown -R root:root /usr/local/lib/isn
|
sudo chown -R root:root /usr/local/lib/isn
|
||||||
|
|
||||||
src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg:
|
src/isn.abst/bin/Release/isn.abst.1.0.24.nupkg:
|
||||||
|
@ -12,6 +12,7 @@ using NuGet.Protocol;
|
|||||||
using NuGet.Packaging;
|
using NuGet.Packaging;
|
||||||
using NuGet.Packaging.Core;
|
using NuGet.Packaging.Core;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using isnd.Entities;
|
||||||
|
|
||||||
namespace isnd.Data.Catalog
|
namespace isnd.Data.Catalog
|
||||||
{
|
{
|
||||||
@ -24,7 +25,7 @@ namespace isnd.Data.Catalog
|
|||||||
/// <param name="apiBase">api Base</param>
|
/// <param name="apiBase">api Base</param>
|
||||||
/// <param name="uri">package permalink</param>
|
/// <param name="uri">package permalink</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public PackageDetails(PackageVersion pkg, string apiBase, string uri): base(uri)
|
public PackageDetails(PackageVersion pkg, string apiBase): base( apiBase + ApiConfig.Registration + "/" + pkg.PackageId + "/" + pkg.FullString + ".json")
|
||||||
{
|
{
|
||||||
PackageId = pkg.Package.Id;
|
PackageId = pkg.Package.Id;
|
||||||
Version = pkg.FullString;
|
Version = pkg.FullString;
|
||||||
@ -40,8 +41,9 @@ namespace isnd.Data.Catalog
|
|||||||
dependencyGroups = pkg.DependencyGroups.ToArray();
|
dependencyGroups = pkg.DependencyGroups.ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PackageDetailsUrl = new Uri(this.id);
|
||||||
// TODO Licence Project Urls, Summary, Title, etc ...
|
|
||||||
|
// TODO Licence Project Urls, Summary, Title, Owners, etc ...
|
||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty("@type")]
|
[JsonProperty("@type")]
|
||||||
|
@ -76,8 +76,7 @@ namespace isnd.Data
|
|||||||
|
|
||||||
public Catalog.Package ToPackage(string apiBase)
|
public Catalog.Package ToPackage(string apiBase)
|
||||||
{
|
{
|
||||||
return new Catalog.Package(apiBase, this.PackageId , FullString,
|
return new Catalog.Package(apiBase, this.PackageId , FullString, new Catalog.PackageDetails(this, apiBase));
|
||||||
new Catalog.PackageDetails(this, apiBase, apiBase + ApiConfig.Registration + "/" + this.PackageId + "/" + FullString + ".json"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsDeleted => LatestCommit?.Action == PackageAction.DeletePackage;
|
public bool IsDeleted => LatestCommit?.Action == PackageAction.DeletePackage;
|
||||||
|
@ -37,7 +37,9 @@ namespace isnd.ViewModels
|
|||||||
version = package.GetLatestVersion(),
|
version = package.GetLatestVersion(),
|
||||||
description = package.Description,
|
description = package.Description,
|
||||||
title = package.Id,
|
title = package.Id,
|
||||||
versions = package.Versions.Select(v => new SearchVersionInfo(regId, v)).ToArray()
|
versions = package.Versions.Select(v => new SearchVersionInfo(regId, v)).ToArray(),
|
||||||
|
registration = regId,
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user