Skip to content

fix install-binary.sh version specification #51

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

Merged
merged 1 commit into from
May 3, 2018

Conversation

kujenga
Copy link
Contributor

@kujenga kujenga commented May 3, 2018

This fixes a bug where the --version flag that can be passed to helm plugin install was not working with the install-binary.sh script that
this repository uses to install the binary files for users.

The issue was that the Helm runs install hooks in the current working
directory [1], so the git describe command that this repository was
executing was not being executed in the directory of the plugin, and
would thus always fail. The fix here is to use the -C flag to git to
specify the directory of the plugin source, ensuring that it will work
correctly regardless of the working directory from which the script is
executed.

Closes #50

[1] https://github.com/kubernetes/helm/blob/401f8bcc187d7a9edeec12c26c64819f105954d5/cmd/helm/plugin.go#L48-L72

This fixes a bug where the --version flag that can be passed to `helm
plugin install` was not working with the install-binary.sh script that
this repository uses to install the binary files for users.

The issue was that the Helm runs install hooks in the current working
directory [1], so the `git describe` command that this repository was
executing was not being executed in the directory of the plugin, and
would thus always fail. The fix here is to use the `-C` flag to git to
specify the directory of the plugin source, ensuring that it will work
correctly regardless of the working directory from which the script is
executed.

Closes databus23#50

[1] https://github.com/kubernetes/helm/blob/401f8bcc187d7a9edeec12c26c64819f105954d5/cmd/helm/plugin.go#L48-L72
@databus23 databus23 merged commit 71337e5 into databus23:master May 3, 2018
@databus23
Copy link
Owner

Thanks for figuring this out!

@kujenga
Copy link
Contributor Author

kujenga commented May 4, 2018

Sure thing!

@kujenga kujenga deleted the install-version-fix branch May 4, 2018 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm plugin install does not pin versions
2 participants