2 Commits

Author SHA1 Message Date
Paul Hinze
2efa6547f4
Updates to make vagrant-spec work in CI
* The vagrant-spec gem is installed as part of bundle install so
   there's no need to install it separately. Remove those extra steps
   and invoke it with bundle exec instead.
 * The binstub for vagrant does not work with `--standalone` in CI, but
   the one generated w/o `--standalone` works fine. This also seems to
   work in dev, so we'll just switch to that one.
 * Fetch all tags in CI to make sure we're getting proper version
   numbers in our build (based off `git describe`).
2022-04-25 12:26:50 -05:00
Paul Hinze
4c21cb6ae5
Add release-grade logic for finding legacy Vagrant
After lots of experimentation I have landed on this as my proposal for
how we have our Go binary find its Ruby counterpart: just have it grab
it from the $PATH! @evanphx showed me this neat trick where by borrowing
a couple of helper methods from `exec` and tweaking them we can get
logic that will do a $PATH lookup that excludes "ourself". This allows
us to have both `vagrant` executables on the path... and means that
switching between Gogo-by-default or Legacy-by-default is just a matter
of tweaking $PATH order.

It _also_ means that we don't need any different lookup logic for
"release mode" vs "development mode" which is what I was looking at
before this solution.

In order to continue to facilitate development, I've generated a binstub
for vagrant using `bundle binstubs vagrant --standalone --path
./binstubs`, and I've updated the Nix development setup to prepend this
directory to the $PATH.

NOTE: Non-Nix users will need to modify their $PATH in the same way to
get the same behavior in development.
2022-04-25 12:26:49 -05:00