Skip to content

Conversation

@nickboldt
Copy link
Contributor

JBDS-3878 pull installer version from package.json

@nickboldt
Copy link
Contributor Author

This PR is not quite perfect.... ran fine, built fine, even the tests ran OK.

But on launch of the 1.6G installer, I get:

system.js:4 Uncaught (in promise) Error: Error: ENOENT: no such file or directory, 
open 'C:\Users\nboldt\AppData\Local\Temp\7zS82BB.tmp\package.json'(…)

So either need a different way to depend on package.json, or need to copy that file over into the .asar file somehow. @dgolovin @joshuawilson @jrichter1 @ppitonak any suggestion how to do that?


generate(jbdsInstallDir, jdkInstallDir) {
let jbdsVersion = "9.1";
let pjson = require('../../package.json');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DevStudio version should be loaded from requirements.json, not from package.json. It also wont work for tests and install time the same way, because root folder is different.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so I can switch to the other file and parse it out of the jbds.jar URL ... but that doesn't help with the other problem re: "no such file or directory" ... does it?

Copy link
Contributor

@dgolovin dgolovin May 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could DevStudio product build just generate contents.json (similar to eclipse p2 repo) with some additional info

{
   "name": "Red Hat Developer Studio Nightly Build",
   "version": "10.0.0.Alpha2",
   "timestamp": "<buildQualifier>",
   "installer": "filename"
}

Installer could use base URL for contents.json and calculate url to download installer file and sha256 file for verification.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also scrape the HTML page and get this information.

https://devstudio.jboss.com/10.0/snapshots/builds/devstudio.product_master/latest/all/ -> jboss-devstudio-10.0.0.Alpha1-v20160506-2012-B5309-installer-standalone.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants