Skip to content

Commit

Permalink
Not all labels are allways present
Browse files Browse the repository at this point in the history
  • Loading branch information
ptr727 committed May 6, 2024
1 parent de87a7c commit eba609e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 195 deletions.
16 changes: 13 additions & 3 deletions CreateMatrix/ReleaseVersionForward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,23 @@ public static void Verify(List<ProductInfo> oldProductList, List<ProductInfo> ne

private static void Verify(ProductInfo oldProduct, ProductInfo newProduct, VersionInfo.LabelType label)
{
// Find label in old product, skip if not present
// TODO: It is possible that a label is released, then pulled, then re-released with a lesser version

// Find label in old and new product, skip if not present
var oldVersion = oldProduct.Versions.FirstOrDefault(item => item.Labels.Contains(label));
if (oldVersion == default(VersionInfo))
{
Log.Logger.Warning("{Product}:{Label} : Label not found", oldProduct.Product, label);
return;
}

// New product must have the same label
var newVersion = newProduct.Versions.First(item => item.Labels.Contains(label));
// Find label in new product, skip if not present
var newVersion = newProduct.Versions.FirstOrDefault(item => item.Labels.Contains(label));
if (newVersion == default(VersionInfo))
{
Log.Logger.Warning("{Product}:{Label} : Label not found", newProduct.Product, label);
return;
}

// New version must be >= old version
if (oldVersion.CompareTo(newVersion) <= 0)
Expand Down
168 changes: 0 additions & 168 deletions Make/Matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38363/nxwitness-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "NxWitness",
"Branch": "main",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/nxwitness:5.1.4.38570",
"docker.io/ptr727/nxwitness:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "NxWitness",
"Branch": "main",
Expand Down Expand Up @@ -118,20 +104,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38363/nxwitness-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "NxWitness-LSIO",
"Branch": "main",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/nxwitness-lsio:5.1.4.38570",
"docker.io/ptr727/nxwitness-lsio:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "NxWitness-LSIO",
"Branch": "main",
Expand Down Expand Up @@ -174,20 +146,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38363/dwspectrum-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "DWSpectrum",
"Branch": "main",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/dwspectrum:5.1.4.38570",
"docker.io/ptr727/dwspectrum:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "DWSpectrum",
"Branch": "main",
Expand Down Expand Up @@ -230,20 +188,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38363/dwspectrum-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "DWSpectrum-LSIO",
"Branch": "main",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/dwspectrum-lsio:5.1.4.38570",
"docker.io/ptr727/dwspectrum-lsio:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "DWSpectrum-LSIO",
"Branch": "main",
Expand Down Expand Up @@ -286,20 +230,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38363/wave-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "WisenetWAVE",
"Branch": "main",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/wisenetwave:5.1.4.38570",
"docker.io/ptr727/wisenetwave:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "WisenetWAVE",
"Branch": "main",
Expand Down Expand Up @@ -342,20 +272,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38363/wave-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "WisenetWAVE-LSIO",
"Branch": "main",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/wisenetwave-lsio:5.1.4.38570",
"docker.io/ptr727/wisenetwave-lsio:rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "WisenetWAVE-LSIO",
"Branch": "main",
Expand Down Expand Up @@ -446,20 +362,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38363/nxwitness-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "NxWitness",
"Branch": "develop",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/nxwitness:develop-5.1.4.38570",
"docker.io/ptr727/nxwitness:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "NxWitness",
"Branch": "develop",
Expand Down Expand Up @@ -490,20 +392,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38363/nxwitness-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "NxWitness-LSIO",
"Branch": "develop",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/nxwitness-lsio:develop-5.1.4.38570",
"docker.io/ptr727/nxwitness-lsio:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "NxWitness-LSIO",
"Branch": "develop",
Expand Down Expand Up @@ -547,20 +435,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38363/dwspectrum-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "DWSpectrum",
"Branch": "develop",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/dwspectrum:develop-5.1.4.38570",
"docker.io/ptr727/dwspectrum:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "DWSpectrum",
"Branch": "develop",
Expand Down Expand Up @@ -604,20 +478,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38363/dwspectrum-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "DWSpectrum-LSIO",
"Branch": "develop",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/dwspectrum-lsio:develop-5.1.4.38570",
"docker.io/ptr727/dwspectrum-lsio:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "DWSpectrum-LSIO",
"Branch": "develop",
Expand Down Expand Up @@ -661,20 +521,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38363/wave-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "WisenetWAVE",
"Branch": "develop",
"CacheScope": "default",
"Tags": [
"docker.io/ptr727/wisenetwave:develop-5.1.4.38570",
"docker.io/ptr727/wisenetwave:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "WisenetWAVE",
"Branch": "develop",
Expand Down Expand Up @@ -718,20 +564,6 @@
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38363/wave-server_update-5.1.3.38363-linux_x64.zip"
]
},
{
"Name": "WisenetWAVE-LSIO",
"Branch": "develop",
"CacheScope": "lsio",
"Tags": [
"docker.io/ptr727/wisenetwave-lsio:develop-5.1.4.38570",
"docker.io/ptr727/wisenetwave-lsio:develop-rc"
],
"Args": [
"DOWNLOAD_ARM64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_arm64-rc.zip",
"DOWNLOAD_VERSION=5.1.4.38570",
"DOWNLOAD_X64_URL=https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_x64-rc.zip"
]
},
{
"Name": "WisenetWAVE-LSIO",
"Branch": "develop",
Expand Down
24 changes: 0 additions & 24 deletions Make/Version.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@
"Latest"
]
},
{
"Version": "5.1.4.38570",
"UriX64": "https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_x64-rc.zip",
"UriArm64": "https://updates.networkoptix.com/default/38570/nxwitness-server_update-5.1.4.38570-linux_arm64-rc.zip",
"Labels": [
"RC"
]
},
{
"Version": "6.0.0.38488",
"UriX64": "https://updates.networkoptix.com/default/38488/nxwitness-server_update-6.0.0.38488-linux_x64-beta.zip",
Expand Down Expand Up @@ -73,14 +65,6 @@
"Latest"
]
},
{
"Version": "5.1.4.38570",
"UriX64": "https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_x64-rc.zip",
"UriArm64": "https://updates.networkoptix.com/digitalwatchdog/38570/dwspectrum-server_update-5.1.4.38570-linux_arm64-rc.zip",
"Labels": [
"RC"
]
},
{
"Version": "6.0.0.38488",
"UriX64": "https://updates.networkoptix.com/digitalwatchdog/38488/dwspectrum-server_update-6.0.0.38488-linux_x64-beta.zip",
Expand Down Expand Up @@ -110,14 +94,6 @@
"Latest"
]
},
{
"Version": "5.1.4.38570",
"UriX64": "https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_x64-rc.zip",
"UriArm64": "https://updates.networkoptix.com/hanwha/38570/wave-server_update-5.1.4.38570-linux_arm64-rc.zip",
"Labels": [
"RC"
]
},
{
"Version": "6.0.0.38488",
"UriX64": "https://updates.networkoptix.com/hanwha/38488/wave-server_update-6.0.0.38488-linux_x64-beta.zip",
Expand Down

0 comments on commit eba609e

Please sign in to comment.