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

Provide a quicker command to see versions, add it to all sections #5639

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daniel-beck
Copy link
Contributor

Untested (waiting for deployment).

@daniel-beck daniel-beck requested a review from jglick October 27, 2022 20:07
@probot-autolabeler probot-autolabeler bot added the documentation Jenkins documentation, including user and developer docs, solution pages, etc. label Oct 27, 2022
@daniel-beck
Copy link
Contributor Author

Comment on lines -155 to +156
mvn validate
mvn validate -Dset.changelist -Dignore.dirt
mvn help:evaluate -Dexpression=project.version
mvn help:evaluate -Dexpression=project.version -Dset.changelist -Dignore.dirt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think leaving this as mvn validate is better, as it runs some additional checks which would help catch some kinds of mistakes. This is a one-time operation so a few extra seconds hardly matters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't validate part of basically any actual build?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes of course, but may as well check basic stuff before pushing a commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The benefit of the explicit help:evaluate is that it makes it easier to read the effective version, as it's not just a side effect of having lines like

[INFO] ----------< org.jenkins-ci.plugins:antisamy-markup-formatter >----------
[INFO] Building OWASP Markup Formatter Plugin 155.v795fb_8702324
[INFO] --------------------------------[ hpi ]---------------------------------

WDYT about mvn validate help:evaluate -Dexpression=project.version …? That way, towards the end of the build log, there would still be a line only containing the version number.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Jenkins documentation, including user and developer docs, solution pages, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants