-
Notifications
You must be signed in to change notification settings - Fork 33
Simplify Gradle build logic for making releases. #700
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
Conversation
Release and release candidate builds require a clean working directory and a matching tag: Create a tag for the release version first, then execute whatever build target you need with the corresponding version specified as project property (`-PpublishVersion=A.B.C` or `-PpublishVersion=A.B.C-rcN`). Release builds additionally enforce signing of the generated artifacts. Ad hoc builds from branches (including `master`) or arbitrary "version" designators always result in SNAPSHOT builds and don't require a clean working directory or a matching tag: Specify the desired "version" as project property (`-PpublishVersion=A-B-C-SNAPSHOT`) or simply omit it (will then use the current branch name).
dfee37c
to
ab7f368
Compare
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.
Besides he empty line I think this is good 👍
@blackwinter can you help me how to review this? what should I try to run? |
First of all, you should review the updated steps in Then you could run various scenarios (without actually pushing/publishing anything!). Different branches/detached head, different If you need more guidance we should meet for a "review session". |
In order to minimize risk of injection attacks.
I followed the MAINTINGING.md locally creating snapshots, rc and releases with tags. This seems to work for the main part. Two things may need some adjustments:
For further context what I tested: Created a new branch on this basis
Create a tag:
When adding a commit and creating a new tag this works.
10 Building release with tag and credentials works:
|
Thanks a lot for the thorough review! Does this mean you approve the pull request?
Just to be clear: This isn't related to the current pull request; signed tags have already been part of the workflow.
That's correct and hasn't changed with this pull request. Why do think release candidates should be signed?
See above. |
yes
Yes, but testing the changes showed a couple of flaws in our documentation.
MAINTINGING.md says the following: metafacture-core/MAINTAINING.md Line 34 in 2debe28
|
Again, this behaviour hasn't changed: Lines 354 to 357 in d835ff4
See also: metafacture-core/MAINTAINING.md Line 88 in d835ff4
|
We need signing all files when uploading to maven central. There are other possibilities to using gpg but why not using gpg ? |
Can you please elaborate? How is the signing currently done in |
Idk, you came up with the question in #700 (comment) . I don't see that you removed any information re signing so I am (still) good. |
scmInfo.isRelease() | ||
scmInfo.isRelease | ||
} | ||
sign publishing.publications.mavenArtifacts |
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.
This is the The Signing Plugin, no? It needs the gpg properties as explained here : https://docs.gradle.org/current/userguide/signing_plugin.html
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.
Yes, it is, and it does. @TobiasNx: Is there anything that needs to be changed in the context of this pull request or can we merge?
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.
With regard to code I dont know. With regard to the build process of RC I think both of my questions are still unanswered: #700 (comment)
If @dr0i says that is irrelevant go ahead.
With regard to the documentation of the Signing Plugin we could open another ticket where we could improve it.
So it's a discussion between you and @TobiasNx then. Maybe you can continue elsewhere if there's nothing actually blocking this pull request? |
Perhaps I am wrong, but there are still two questions for @dr0i that were not answered. Both are related to release candidates: One regarding the SNAPSHOT suffix on release candidates:
(See here: #700 (comment)) To be specific I uploaded the RC only to Github packages: https://github.com/metafacture/metafacture-core/releases/tag/metafacture-core-7.0.0-rc1) One regarding the Singing of release candidates, see #700 (comment): |
Sorry to keep belaboring this point, but neither of your questions is related to the modifications made here. The behaviour is unchanged. It's okay to discuss and maybe improve the documentation and/or the code, but any action to be taken is out-of-scope for this pull request, isn't it? |
@blackwinter talked to @dr0i go ahead, we will adjust any documentation later. |
Resolves #684.
Release and release candidate builds require a clean working directory and a matching tag: Create a tag for the release version first, then execute whatever build target you need with the corresponding version specified as project property (
-PpublishVersion=A.B.C
or-PpublishVersion=A.B.C-rcN
). Release builds additionally enforce signing of the generated artifacts.Ad hoc builds from branches (including
master
) or arbitrary "version" designators always result in SNAPSHOT builds and don't require a clean working directory or a matching tag: Specify the desired "version" as project property (-PpublishVersion=A-B-C-SNAPSHOT
) or simply omit it (will then use the current branch name).Behavioural changes:
releases/*
for release builds and*-rc*
for release candidates).