mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-04-06 18:36:50 +00:00
fix(postgres): add legacy EnterpriseDB releases and appendLegacy pipeline step
Hardcode the old 10.12, 10.13, 11.8, 12.3 releases from EnterpriseDB that predate the bnnanet/postgresql-releases GitHub repo. Both postgres and psql now match the live cache exactly.
This commit is contained in:
@@ -77,6 +77,7 @@ func Package(pkg string, conf *installerconf.Conf, d *rawcache.Dir) ([]storage.A
|
||||
TagVariants(pkg, assets)
|
||||
NormalizeVersions(pkg, assets)
|
||||
assets = ApplyConfig(assets, conf)
|
||||
assets = appendLegacy(pkg, assets)
|
||||
return assets, nil
|
||||
}
|
||||
|
||||
@@ -160,6 +161,16 @@ func TagVariants(pkg string, assets []storage.Asset) {
|
||||
}
|
||||
}
|
||||
|
||||
// appendLegacy adds hardcoded legacy releases for packages that had
|
||||
// releases from sources that no longer exist (e.g. EnterpriseDB binaries).
|
||||
func appendLegacy(pkg string, assets []storage.Asset) []storage.Asset {
|
||||
switch pkg {
|
||||
case "postgres":
|
||||
assets = append(assets, postgres.LegacyReleases()...)
|
||||
}
|
||||
return assets
|
||||
}
|
||||
|
||||
// ApplyConfig applies asset_filter, exclude, and version prefix stripping
|
||||
// from a package's releases.conf.
|
||||
func ApplyConfig(assets []storage.Asset, conf *installerconf.Conf) []storage.Asset {
|
||||
|
||||
@@ -14,3 +14,67 @@ func NormalizeVersions(assets []storage.Asset) {
|
||||
assets[i].Version = strings.ReplaceAll(v, "_", ".")
|
||||
}
|
||||
}
|
||||
|
||||
// LegacyReleases returns the old EnterpriseDB binary releases that predate
|
||||
// the bnnanet/postgresql-releases GitHub repo.
|
||||
func LegacyReleases() []storage.Asset {
|
||||
edbURL := "https://get.enterprisedb.com/postgresql/"
|
||||
return []storage.Asset{
|
||||
{
|
||||
Filename: "postgresql-10.12-1-linux-x64-binaries.tar.gz",
|
||||
Version: "10.12",
|
||||
Channel: "stable",
|
||||
OS: "linux",
|
||||
Arch: "x86_64",
|
||||
Libc: "gnu",
|
||||
Format: ".tar.gz",
|
||||
Download: edbURL + "postgresql-10.12-1-linux-x64-binaries.tar.gz?ls=Crossover&type=Crossover",
|
||||
},
|
||||
{
|
||||
Filename: "postgresql-10.12-1-linux-binaries.tar.gz",
|
||||
Version: "10.12",
|
||||
Channel: "stable",
|
||||
OS: "linux",
|
||||
Arch: "x86",
|
||||
Libc: "gnu",
|
||||
Format: ".tar.gz",
|
||||
Download: edbURL + "postgresql-10.12-1-linux-binaries.tar.gz?ls=Crossover&type=Crossover",
|
||||
},
|
||||
{
|
||||
Filename: "postgresql-10.12-1-osx-binaries.zip",
|
||||
Version: "10.12",
|
||||
Channel: "stable",
|
||||
OS: "darwin",
|
||||
Arch: "x86_64",
|
||||
Format: ".zip",
|
||||
Download: edbURL + "postgresql-10.12-1-osx-binaries.zip?ls=Crossover&type=Crossover",
|
||||
},
|
||||
{
|
||||
Filename: "postgresql-10.13-1-osx-binaries.zip",
|
||||
Version: "10.13",
|
||||
Channel: "stable",
|
||||
OS: "darwin",
|
||||
Arch: "x86_64",
|
||||
Format: ".zip",
|
||||
Download: edbURL + "postgresql-10.13-1-osx-binaries.zip?ls=Crossover&type=Crossover",
|
||||
},
|
||||
{
|
||||
Filename: "postgresql-11.8-1-osx-binaries.zip",
|
||||
Version: "11.8",
|
||||
Channel: "stable",
|
||||
OS: "darwin",
|
||||
Arch: "x86_64",
|
||||
Format: ".zip",
|
||||
Download: edbURL + "postgresql-11.8-1-osx-binaries.zip?ls=Crossover&type=Crossover",
|
||||
},
|
||||
{
|
||||
Filename: "postgresql-12.3-1-osx-binaries.zip",
|
||||
Version: "12.3",
|
||||
Channel: "stable",
|
||||
OS: "darwin",
|
||||
Arch: "x86_64",
|
||||
Format: ".zip",
|
||||
Download: edbURL + "postgresql-12.3-1-osx-binaries.zip?ls=Crossover&type=Crossover",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user