TIBCOSoftware / mashling

Project Mashling
86 stars 15 forks source link

Bugfix #232 #238

Closed jeffreybozek closed 6 years ago

jeffreybozek commented 6 years ago

Fixes issue #232. Show correct version when using binaries generated from the CLI.

rameshpolishetti commented 6 years ago

@jeffreybozek This PR fixes the issue partially i.e. if the user builds custom gateway using docker option then it works as expected.

There is another scenario to consider i.e. user builds using -N (native option) in a git repository folder (most likely user checks out mashling-recipes git repository and navigate to intended recipe folder). In this case, custom gateway version would be incorrect (mashling-recipes latest tag version would be shown instead of mashling-cli version).

You may consider checking .version file in build.go -> init() first [covers custom gateway case], if not available then get the version from git [covers existing cases]