Skip to content
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

fix: make dist should put diff binaries in bin folder #52

Merged
merged 2 commits into from
Jun 12, 2018

Conversation

hoesler
Copy link
Contributor

@hoesler hoesler commented May 16, 2018

No description provided.

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 4, 2018

@hoesler Hi. Thanks for the PR!

Would you mind clarifying your original purpose of this fix?

I thought that you wanted to install the plugin via a release tarball i.e. helm plugin install https://github.com/databus23/helm-diff/releases/download/v2.9.0%2B1/helm-diff-macos.tgz.

But as far as I can see, your fix alone isn't enough for that. When I actually run the command, it fails like this:

$ helm plugin install https://github.com/databus23/helm-diff/releases/download/v2.9.0%2B1/helm-diff-macos.tgz
Error: plugin metadata (plugin.yaml) missing

Looking into the tarball, it seems like we need to flatten the contents of the tarball in order for helm install to notice the plugin.yaml?

$ tar tzvf helm-diff.tgz
drwxr-xr-x  0 fabian staff       0  4 27 07:58 diff/
-rw-r--r--  0 fabian staff   11358  4 27 07:58 diff/LICENSE
-rw-r--r--  0 fabian staff     328  4 27 07:58 diff/plugin.yaml
-rwxr-xr-x  0 fabian staff 15298900  4 27 07:58 diff/diff
-rw-r--r--  0 fabian staff     1510  4 27 07:58 diff/README.md

@hoesler
Copy link
Contributor Author

hoesler commented Jun 5, 2018

Sorry for not making the purpose clearer.

Due to some constraints, I am actually installing the plugin with curl -L $TARBALL_URL | tar -C $(helm home)/plugins -xzv. With the 2.9 release, the value for the command key in the plugin.yaml has changed to "$HELM_PLUGIN_DIR/bin/diff" while the path of the diff binary in the package has not.

I must admit, that I didn't check if my changes break an installation with helm plugin install. Probably this line in the install-binary.sh script has to be adjusted. I will look into it and update my PR.

@databus23 databus23 merged commit 5c7501b into databus23:master Jun 12, 2018
@databus23
Copy link
Owner

Thanks for bringing this up.
The binary was moved to the bin folder because the normal installation procedure clones the repo and since the last refactor there now is a folder diff, hence the binary can't be placed in the plugin root anymore.

@jkroepke
Copy link
Contributor

I'm still hitting this error:

helm plugin install https://github.com/databus23/helm-diff/releases/download/v2.9.0+2/helm-diff-macos.tgz
Error: plugin metadata (plugin.yaml) missing

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.

4 participants