5.4 has SNAPSHOT version

(Chris Weed) #1

When I run a build on Kibana source:

npm run build -- --skip-os-packages --release

The resulting zip file has SNAPSHOT in the name. No big deal except that the internal package.json has this:

  "version": "5.4.0-SNAPSHOT",

Now Kibana refuses to run on ES that's at version 5.4.0 because the versions don't match. Is there some new flag that I need to set to not put the SNAPSHOT word into the versions?

(Lukas Olson) #2

The --release flag should accomplish this. I'm not exactly sure why this is happening for you, but when I run the exact command you provided, the resulting zip files do not contain the -SNAPSHOT suffix. What tag/branch are you on?

(Chris Weed) #3

I thought so too, but even running the grunt task directly resulted in the same issue.

Since I've already forked kibana (5.4.0) I solved the issue this way:

function buildVersion(isRelease, version) {
  // Screw this, we are always release...
  // return isRelease ? version : `${version}-SNAPSHOT`;
  console.log('Grunt thinks this is a release? ', isRelease);
  return version;

During the build it spit out undefined for the value of isRelease. I see this function is called here:

const version = buildVersion(grunt.option('release'), pkgVersion);

For some reason it seems grunt.option doesn't work. I had to revert my grunt version to 0.4.0 because another dependency that was causing Kibana to fail: grunt-angular-translate

It seems grunt-angular-translate has a hard dependency on having "grunt": "~0.4.0":

Lastly, I've had to manually add create-react-class to my package as well, since that also caused some build errors.

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.