summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2020-03-26 15:03:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2020-03-26 15:03:18 +0100
commitab5fdbbb923a7c5fa79afa52b8afdd60070235d0 (patch)
tree4d685996bd65066e8bede4936c8c9ab667026b0c
parentFix nugetPackageCache check (diff)
downloadice-ab5fdbbb923a7c5fa79afa52b8afdd60070235d0.tar.bz2
ice-ab5fdbbb923a7c5fa79afa52b8afdd60070235d0.tar.xz
ice-ab5fdbbb923a7c5fa79afa52b8afdd60070235d0.zip
Fixed Nuget package version caching
-rw-r--r--scripts/Component.py3
-rw-r--r--scripts/Util.py10
2 files changed, 5 insertions, 8 deletions
diff --git a/scripts/Component.py b/scripts/Component.py
index fa04a7b089c..8e7ac947eab 100644
--- a/scripts/Component.py
+++ b/scripts/Component.py
@@ -35,9 +35,6 @@ class Ice(Component):
"mx" : [True],
}
- def __init__(self):
- self.nugetVersion = None
-
def useBinDist(self, mapping, current):
return Component._useBinDist(self, mapping, current, "ICE_BIN_DIST")
diff --git a/scripts/Util.py b/scripts/Util.py
index ae3f814fea1..261bda68bd9 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -78,7 +78,7 @@ class to provide component specific information.
class Component(object):
def __init__(self):
- self.nugetVersion = None
+ self.nugetVersion = {}
"""
Returns whether or not to use the binary distribution.
@@ -114,7 +114,7 @@ class Component(object):
"net" if isinstance(mapping, CSharpMapping) else platform.getPlatformToolset())
def getNugetPackageVersion(self, mapping):
- if not self.nugetVersion:
+ if not mapping in self.nugetVersion:
file = self.getNugetPackageVersionFile(mapping)
if file.endswith(".nuspec"):
expr = "<version>(.*)</version>"
@@ -124,10 +124,10 @@ class Component(object):
with open(file, "r") as config:
m = re.search(expr, config.read())
if m:
- self.nugetVersion = m.group(1)
- if not self.nugetVersion:
+ self.nugetVersion[mapping] = m.group(1)
+ if not mapping in self.nugetVersion:
raise RuntimeError("couldn't figure out the nuget version from `{0}'".format(file))
- return self.nugetVersion
+ return self.nugetVersion[mapping]
def getNugetPackageVersionFile(self, mapping):
raise RuntimeError("must be overriden if component provides C++ or C# nuget packages")