-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Travis, linter, commit hooks and fix races #13
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Put locking around the tvm Get() call instead of download(). This should prevent multiple downloads from taking place due to the fact that two threads both seeing that the requested Terraform version is not present in the repository. * Improve the mkdir calls. Instead of checking to see if a directory exists before creating it, just create it and then ignore a "file exists" error.
dansimau
changed the title
Add TravisCI, linter, commit hooks
Add Travis, linter, commit hooks and fix races
Dec 28, 2018
btromanova
reviewed
Dec 28, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not related to this diff, but I've noticed that help
for tvm command doesn't tell you to specify the version you want to get. Maybe you can fix it in this PR as well. If not, I can create a separate issue for that:
tr-C02Q34JGG8WM:astro tatianaromanova$ tvm install --help
Download and link the specified version of Terraform
Usage:
tvm install [flags]
Flags:
-h, --help help for install
--path string path to link Terraform binary to (default: /usr/local/bin/terraform )
Global Flags:
--repo string path to store versions (default is $HOME/.tvm)
Binaries weren't being rebuilt when Go source files changed.
btromanova
approved these changes
Dec 28, 2018
CorgiMan
reviewed
Dec 28, 2018
CorgiMan
reviewed
Dec 28, 2018
CorgiMan
approved these changes
Dec 28, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds Travis configuration, a
make lint
and precommit hook for lintinglocally.
This also fixes issues in the Makefile where
make test
was returning trueeven when tests failed (due to shell pipe in Makefile) and where binaries
weren't rebuilt when source files changed.
Finally, this also fixes some race conditions that were showing up as flakey
tests. Namely, fixed a race in downloading of the Terraform binary and also
when creating download directories.