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
onfluent-platform: fix confluent-platform cli #50592
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,36 @@ class ConfluentPlatform < Formula | |
|
||
conflicts_with "kafka", :because => "kafka also ships with identically named Kafka related executables" | ||
|
||
patch :DATA | ||
|
||
def install | ||
prefix.install "bin" | ||
rm_rf "#{bin}/windows" | ||
prefix.install "etc" | ||
prefix.install "share" | ||
prefix.install "libexec" | ||
rm_rf "#{libexec}/cli/linux_386" | ||
rm_rf "#{libexec}/cli/linux_amd64" | ||
rm_rf "#{libexec}/cli/windows_386" | ||
rm_rf "#{libexec}/cli/windows_amd64" | ||
end | ||
|
||
test do | ||
assert_match version.to_s, shell_output("#{bin}/kafka-broker-api-versions --version") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you improve this test to use some of the functionality of the software? Version tests rarely indicate that something is actually wrong. And especially if you're going to patch something we need a test. |
||
end | ||
end | ||
__END__ | ||
diff --git a/bin/confluent b/bin/confluent | ||
index 1247e4f..fadbb8d 100755 | ||
--- a/bin/confluent | ||
+++ b/bin/confluent | ||
@@ -184,7 +184,8 @@ BINARY=confluent | ||
OS=$(uname_os) | ||
ARCH=$(uname_arch) | ||
PREFIX="${OWNER}/${REPO}" | ||
-EXE_PATH="${BASH_SOURCE%/*}/../libexec/cli" | ||
+SELF=$(realpath "${BASH_SOURCE}") | ||
+EXE_PATH="${SELF%/*}/../libexec/cli" | ||
PLATFORM="${OS}/${ARCH}" | ||
|
||
# use in logging routines |
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.
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.
Has this been reported upstream? This needs a comment and a link to an upstream issue at a minimum and description of when it should be removed or how it should be updated. In an ideal world, upstream would accept the fix and we would use a
patch do
block to grab the patch from github.