|
|
|
@ -180,13 +180,12 @@ func ViewPackageVersion(ctx *context.Context) { |
|
|
|
|
ctx.Data["IsPackagesPage"] = true |
|
|
|
|
ctx.Data["PackageDescriptor"] = pd |
|
|
|
|
|
|
|
|
|
curAppURL, _ := url.Parse(httplib.GuessCurrentAppURL(ctx)) |
|
|
|
|
packageRegistryHost := curAppURL.Host |
|
|
|
|
ctx.Data["PackageRegistryHost"] = packageRegistryHost |
|
|
|
|
|
|
|
|
|
switch pd.Package.Type { |
|
|
|
|
case packages_model.TypeContainer: |
|
|
|
|
registryAppURL, err := url.Parse(httplib.GuessCurrentAppURL(ctx)) |
|
|
|
|
if err != nil { |
|
|
|
|
registryAppURL, _ = url.Parse(setting.AppURL) |
|
|
|
|
} |
|
|
|
|
ctx.Data["RegistryHost"] = registryAppURL.Host |
|
|
|
|
case packages_model.TypeAlpine: |
|
|
|
|
branches := make(container.Set[string]) |
|
|
|
|
repositories := make(container.Set[string]) |
|
|
|
@ -209,12 +208,7 @@ func ViewPackageVersion(ctx *context.Context) { |
|
|
|
|
ctx.Data["Repositories"] = util.Sorted(repositories.Values()) |
|
|
|
|
ctx.Data["Architectures"] = util.Sorted(architectures.Values()) |
|
|
|
|
case packages_model.TypeArch: |
|
|
|
|
registryAppURL, err := url.Parse(httplib.GuessCurrentAppURL(ctx)) |
|
|
|
|
if err != nil { |
|
|
|
|
registryAppURL, _ = url.Parse(setting.AppURL) |
|
|
|
|
} |
|
|
|
|
ctx.Data["RegistryHost"] = registryAppURL.Host |
|
|
|
|
ctx.Data["SignMail"] = fmt.Sprintf("%s@noreply.%s", ctx.Package.Owner.Name, registryAppURL.Host) |
|
|
|
|
ctx.Data["SignMail"] = fmt.Sprintf("%s@noreply.%s", ctx.Package.Owner.Name, packageRegistryHost) |
|
|
|
|
groups := make(container.Set[string]) |
|
|
|
|
for _, f := range pd.Files { |
|
|
|
|
for _, pp := range f.Properties { |
|
|
|
|