# 5.4 has SNAPSHOT version

**URL:** <https://discuss.elastic.co/t/5-4-has-snapshot-version/85411>\
**Category:** Kibana\
**Created:** [May 11, 2017, 1:40pm UTC](https://discuss.elastic.co/t/5-4-has-snapshot-version/85411 "2017-05-11T13:40:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kikketer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikketer/32/13813_2.png) [@Kikketer](https://discuss.elastic.co/u/Kikketer)\
**Post date:** [May 11, 2017, 1:40pm UTC](https://discuss.elastic.co/t/5-4-has-snapshot-version/85411/1 "2017-05-11T13:40:45Z")

</div>

When I run a build on Kibana source:

```auto
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:

```auto
  "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?

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [May 11, 2017, 4:40pm UTC](https://discuss.elastic.co/t/5-4-has-snapshot-version/85411/2 "2017-05-11T16:40:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Kikketer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kikketer/32/13813_2.png) [@Kikketer](https://discuss.elastic.co/u/Kikketer)\
**Post date:** [May 11, 2017, 9:24pm UTC](https://discuss.elastic.co/t/5-4-has-snapshot-version/85411/3 "2017-05-11T21:24:43Z")

</div>

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:

```auto
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:

```auto
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"`:

> <https://github.com/angular-translate/grunt-angular-translate/blob/master/package.json#L17>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 8, 2017, 9:37pm UTC](https://discuss.elastic.co/t/5-4-has-snapshot-version/85411/4 "2017-06-08T21:37:00Z")

</div>

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