-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 build process failing on source archives #10769
base: main
Are you sure you want to change the base?
Conversation
There is no intention for this to be used this way. It is part of the Strimzi CI and should be used as part of the Strimzi CI. |
During releases, we provide source packages, and one should be able to build the project from there following the DEV_GUIDE. |
I don't think there is any expectation like that. You are expected to build the project from the Github repository. If you wanna build some release, use the build tag. |
But you can download the project as ZIP file from the GitHub repository, and that would also fail. |
@fvaleri did we state to build the project from the source zip somewhere there? I can't find it. Saying that, I think we should make a decision about stating in the DEV_GUIDE you can't build project from sources from zip but just cloning from GitHub or fixing the issue as this PR does. @scholzj any drawbacks you see in this PR? I can't see anything which could hurt, or? |
Yes. It adds yet another complication to the tooling that someone needs to maintain, which has a risk of breaking down etc. It also does not seem to have any real use-case. |
In reality the fix is just checking the we are inside a Git repo or not. My only doubt if it is a real fix or just a workaround. |
This patch fixes the build process failing on source archives. The build process fails when run on a source archive that does not contain the `.git` folder. ```sh ./.azure/scripts/check_docs.sh make[1]: Entering directory '/home/fvaleri/Downloads/strimzi-kafka-operator-0.44.0-rc1' documentation/snip-kafka-versions.sh > documentation/modules/snip-kafka-versions.adoc documentation/version-dependent-attrs.sh > documentation/shared/version-dependent-attrs.adoc documentation/snip-images.sh > documentation/modules/snip-images.adoc make[1]: Leaving directory '/home/fvaleri/Downloads/strimzi-kafka-operator-0.44.0-rc1' warning: Not a git repository. Use --no-index to compare two paths outside a working tree usage: git diff --no-index [<options>] <path> <path> ``` Reproducer: ```sh wget https://github.com/strimzi/strimzi-kafka-operator/archive/refs/tags/0.44.0-rc1.tar.gz tar xzf strimzi-kafka-operator-0.44.0-rc1.tar.gz cd strimzi-kafka-operator-0.44.0-rc1 make MVN_ARGS="-DskipTests" all ``` Signed-off-by: Federico Valeri <[email protected]>
Type of change
Description
This patch fixes the build process failing on source archives.
The build process fails when running on a source archive that does not contain the
.git
folder.Reproducer: