Kitware / minerva

Minerva: client/server/services for analysis and visualization
Apache License 2.0
36 stars 14 forks source link

Get ansible minerva version from current git branch #316

Closed mgrauer closed 8 years ago

mgrauer commented 8 years ago

This feature will provision the ansible/vagrant version of minerva using the current git branch, to be set as minerva_version.

E.g. On my host, I'm on git branch feature_foo_la_la, and I provision a new VM. The minerva on that VM will be on git branch feature_foo_la_la as well. If my minerva git branch on my host is master, then the VM minerva will be provisioned on master as well.

@kotfic

I got this working while QA-ing #315. Fixes #303.

PTAL.

kotfic commented 8 years ago

Love it, for the command though how about the following?

git rev-parse --abbrev-ref HEAD 2>/dev/null || echo master

That should protect against junk getting into the minerva_version (i.e. if you're not in a git repo for some reason)

mgrauer commented 8 years ago

Good call, thanks @kotfic . This worked.

kotfic commented 8 years ago

Assuming travis is green this LGTM