summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2015-01-28 12:59:54 -0330
committerDwayne Boone <dwayne@zeroc.com>2015-01-28 12:59:54 -0330
commit30fca2019456d08cb8de62c2a719c861d0e0507c (patch)
treec97e0c8170e5c63e1b2dbda34327aad4c870983d
parentFixed makejspackages.py to have proper version substitution (diff)
downloadice-30fca2019456d08cb8de62c2a719c861d0e0507c.tar.bz2
ice-30fca2019456d08cb8de62c2a719c861d0e0507c.tar.xz
ice-30fca2019456d08cb8de62c2a719c861d0e0507c.zip
Fixed versions in js distribution files
-rw-r--r--distribution/lib/DistUtils.py20
-rwxr-xr-xdistribution/makedist.py6
-rw-r--r--distribution/src/js/gulp-zeroc-slice2js/README.md4
-rw-r--r--distribution/src/js/gulp-zeroc-slice2js/package.json4
-rw-r--r--distribution/src/js/icejs-demos/bower.json4
-rw-r--r--distribution/src/js/icejs-demos/package.json6
-rw-r--r--distribution/src/js/zeroc-icejs/bower.json2
-rw-r--r--distribution/src/js/zeroc-icejs/package.json2
-rw-r--r--distribution/src/js/zeroc-slice2js/package.json2
9 files changed, 28 insertions, 22 deletions
diff --git a/distribution/lib/DistUtils.py b/distribution/lib/DistUtils.py
index f666d45e835..fcf961a1611 100644
--- a/distribution/lib/DistUtils.py
+++ b/distribution/lib/DistUtils.py
@@ -320,7 +320,7 @@ def fixMakeRules(file):
#
# Fix version in given file.
#
-def fixVersion(file, version, mmversion = None, libversion = None, debversion = None, debmmversion = None, majorVersion = None, minorVersion = None):
+def fixVersion(file, version, mmversion = None, libversion = None, debversion = None, debmmversion = None, majorVersion = None, minorVersion = None, jsonVersion = None):
origfile = file + ".orig"
os.rename(file, origfile)
@@ -340,6 +340,8 @@ def fixVersion(file, version, mmversion = None, libversion = None, debversion =
line = re.sub("@majorver@", majorVersion, line)
if minorVersion:
line = re.sub("@minorver@", minorVersion, line)
+ if jsonVersion:
+ line = re.sub("@jsonver@", jsonVersion, line)
newFile.write(line)
newFile.close()
oldFile.close()
@@ -801,7 +803,7 @@ class Platform:
def getJavaEnv(self):
return "CLASSPATH=" + string.join([t.getJar() for t in self.thirdParties if t.getJar()], os.pathsep)
-
+
def getJavaBuildOptions(self):
return ""
@@ -913,7 +915,7 @@ class Darwin(Platform):
for name in ["freeze", "glacier2", "ice", "icebox", "icediscovery", "icegrid", "icepatch2", "icestorm", "ice-gradle-plugin", "ant-ice"]:
runCommand("cd %s/lib && rm -f %s.jar" % (iceRootDir, name))
runCommand("cd %s/lib && ln -s %s-%s.jar %s.jar" % (iceRootDir, name, "@ver@", name))
-
+
for name in ["freeze", "glacier2", "ice", "icebox", "icediscovery", "icegrid", "icepatch2", "icestorm"]:
runCommand("cd %s/lib && rm -f %s.jar" % (iceRootDir, name))
runCommand("cd %s/lib && ln -s %s-%s-source.jar %s-source.jar" % (iceRootDir, name, "@ver@", name))
@@ -922,32 +924,32 @@ class Darwin(Platform):
packageRoot = os.path.join(buildRootDir, "Ice-@ver@")
packageInstallLocation = "/Library/Developer/Ice-@ver@"
- runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" %
+ runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" %
(packageRoot, package, packageInstallLocation, packagesDir, package))
package = "com.zeroc.icepython"
packageRoot = os.path.join(buildRootDir, "python")
packageInstallLocation = "/Library/Python/2.7/site-packages"
- runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" %
+ runCommand("pkgbuild --root %s --identifier=%s --install-location=%s --version @ver@ %s/%s.pkg" %
(packageRoot, package, packageInstallLocation, packagesDir, package))
package = "com.zeroc.icegridadmin"
packageRoot = os.path.join(buildRootDir, "IceGrid Admin.app")
packageInstallLocation = "/Applications/IceGrid Admin.app"
- runCommand("pkgbuild --root \"%s\" --identifier=%s --install-location=\"%s\" --version @ver@ %s/%s.pkg" %
+ runCommand("pkgbuild --root \"%s\" --identifier=%s --install-location=\"%s\" --version @ver@ %s/%s.pkg" %
(packageRoot, package, packageInstallLocation, packagesDir, package))
distribution = os.path.join(distDir, "src", "mac", "Ice", "distribution.xml")
resources = os.path.join(distDir, "src", "mac", "Ice", "resources")
scripts = os.path.join(distDir, "src", "mac", "Ice", "scripts")
-
- runCommand("productbuild --distribution=%s --resources=%s --scripts=%s --package-path=%s %s/Ice-@ver@.pkg" %
+
+ runCommand("productbuild --distribution=%s --resources=%s --scripts=%s --package-path=%s %s/Ice-@ver@.pkg" %
(distribution, resources, scripts, packagesDir, installerDir))
-
+
copy(os.path.join(distDir, "src", "mac", "Ice", "README.txt"), installerDir)
copy(os.path.join(distDir, "src", "mac", "Ice", "uninstall.sh"), installerDir)
diff --git a/distribution/makedist.py b/distribution/makedist.py
index 81492d3b0dd..055a0b08d08 100755
--- a/distribution/makedist.py
+++ b/distribution/makedist.py
@@ -165,11 +165,12 @@ libversion = mmversion.replace('.', '')
majorVersion = FixUtil.majorVersion(version)
minorVersion = FixUtil.minorVersion(version)
patchVersion = FixUtil.patchVersion(version) if FixUtil.patchVersion(version) != "51" else "0"
+jsonVersion = FixUtil.jsonVersion(version)
debmmversion = majorVersion + "." + minorVersion
debversion = majorVersion + "." + minorVersion + "." + patchVersion
-versions = (version, mmversion, libversion, debversion, debmmversion, majorVersion, minorVersion)
+versions = (version, mmversion, libversion, debversion, debmmversion, majorVersion, minorVersion, jsonVersion)
config.close()
#
@@ -245,6 +246,9 @@ def createDistfilesDist(platform, whichDestDir):
# Fix version of README files
if fnmatch.fnmatch(f, "README*"):
fixVersion(filepath, *versions)
+ # Fix version of JSON files
+ if fnmatch.fnmatch(f, "*.json"):
+ fixVersion(filepath, *versions)
fixFilePermission(filepath, verbose)
for d in dirnames:
diff --git a/distribution/src/js/gulp-zeroc-slice2js/README.md b/distribution/src/js/gulp-zeroc-slice2js/README.md
index f780dd07606..7a473962cb8 100644
--- a/distribution/src/js/gulp-zeroc-slice2js/README.md
+++ b/distribution/src/js/gulp-zeroc-slice2js/README.md
@@ -24,7 +24,7 @@ gulp.task('compile', function() {
The path to the slice2js executable. By default the npm package [zeroc-slice2js](https://github.com/ZeroC-Inc/zeroc-slice2js) will be used.
```js
-slice2js({exe: "/opt/Ice-3.6b/slice2js"})
+slice2js({exe: "/opt/Ice-@ver@/slice2js"})
```
### args `Array`
@@ -32,7 +32,7 @@ slice2js({exe: "/opt/Ice-3.6b/slice2js"})
The list of arguments passed to slice2js.
```js
-slice2js({args: ["-I/opt/Ice-3.6b/slice"]})
+slice2js({args: ["-I/opt/Ice-@ver@/slice"]})
```
For a full list of arguments you can pass to the slice2js compiler refer to the [zeroc-slice2js package](https://github.com/ZeroC-Inc/zeroc-slice2js).
diff --git a/distribution/src/js/gulp-zeroc-slice2js/package.json b/distribution/src/js/gulp-zeroc-slice2js/package.json
index a594cee0fd0..0754723a3c3 100644
--- a/distribution/src/js/gulp-zeroc-slice2js/package.json
+++ b/distribution/src/js/gulp-zeroc-slice2js/package.json
@@ -1,6 +1,6 @@
{
"name": "gulp-zeroc-slice2js",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Gulp plugin to compile Slice files to JavaScript",
"main": "index.js",
"author": "Zeroc, Inc.",
@@ -14,7 +14,7 @@
"IceJS"
],
"dependencies": {
- "zeroc-slice2js": "^3.6.0-beta.0",
+ "zeroc-slice2js": "^@jsonver@",
"gulp-util": "^3.0.2",
"through2": "^0.6.3"
}
diff --git a/distribution/src/js/icejs-demos/bower.json b/distribution/src/js/icejs-demos/bower.json
index d9fa6a07caf..1456e10e858 100644
--- a/distribution/src/js/icejs-demos/bower.json
+++ b/distribution/src/js/icejs-demos/bower.json
@@ -1,6 +1,6 @@
{
"name": "zeroc-icejs-demos",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Ice for JavaScript runtime",
"author": "Zeroc, Inc.",
"homepage": "https://zeroc.com",
@@ -20,6 +20,6 @@
"spin.js": "~2.0.2",
"nouislider": "~7.0.10",
"highlightjs": "~8.4.0",
- "zeroc-icejs": "~3.6.0-beta.0"
+ "zeroc-icejs": "~@jsonver@"
}
}
diff --git a/distribution/src/js/icejs-demos/package.json b/distribution/src/js/icejs-demos/package.json
index b34a71b65c3..a761781c506 100644
--- a/distribution/src/js/icejs-demos/package.json
+++ b/distribution/src/js/icejs-demos/package.json
@@ -1,6 +1,6 @@
{
"name": "zeroc-icejs-demos",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Sample programs for Ice (Internet Communications Engine)",
"author": "ZeroC, Inc. <info@zeroc.com>",
"homepage": "https://www.zeroc.com",
@@ -18,9 +18,9 @@
"gulp-newer": "^0.5.0",
"gulp-open": "^0.3.1",
"gulp-uglify": "^1.0.2",
- "gulp-zeroc-slice2js": "^3.6.0-beta.0",
+ "gulp-zeroc-slice2js": "^@jsonver@",
"http-proxy": "^1.8.1",
- "zeroc-icejs": "^3.6.0-beta.0",
+ "zeroc-icejs": "^@jsonver@",
"vinyl-paths": "^1.0.0"
},
"scripts": {
diff --git a/distribution/src/js/zeroc-icejs/bower.json b/distribution/src/js/zeroc-icejs/bower.json
index 0e2f1b83820..413364a17a9 100644
--- a/distribution/src/js/zeroc-icejs/bower.json
+++ b/distribution/src/js/zeroc-icejs/bower.json
@@ -1,6 +1,6 @@
{
"name": "zeroc-icejs",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Ice for JavaScript runtime",
"author": "Zeroc, Inc.",
"homepage": "https://www.zeroc.com",
diff --git a/distribution/src/js/zeroc-icejs/package.json b/distribution/src/js/zeroc-icejs/package.json
index 436e6d65575..970e1e610f8 100644
--- a/distribution/src/js/zeroc-icejs/package.json
+++ b/distribution/src/js/zeroc-icejs/package.json
@@ -1,6 +1,6 @@
{
"name": "zeroc-icejs",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Ice for JavaScript runtime",
"author": "Zeroc, Inc.",
"homepage": "https://www.zeroc.com",
diff --git a/distribution/src/js/zeroc-slice2js/package.json b/distribution/src/js/zeroc-slice2js/package.json
index 90a2e7a2f4f..e6b9e03e300 100644
--- a/distribution/src/js/zeroc-slice2js/package.json
+++ b/distribution/src/js/zeroc-slice2js/package.json
@@ -1,6 +1,6 @@
{
"name": "zeroc-slice2js",
- "version": "3.6.0-beta.0",
+ "version": "@jsonver@",
"description": "Ice Slice to JavaScript compiler",
"homepage": "https://www.zeroc.com",
"repository": "https://github.com/zeroc-inc/zeroc-slice2js.git",