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
Issue #11726: Automate creation of settings.xml file for release #11743
Conversation
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.
Items
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.
Items
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.
Items
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.
Items
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.
Items
.ci/prepare-settings.sh
Outdated
|
||
if cmp -s "$file1" "$file2"; then | ||
date=$(date +"%m%d%y") | ||
mv ~/.m2/settings.xml ~/.m2/settings.xml.backup."${date}" |
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.
indentation
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.
Changes Done
.ci/prepare-settings.sh
Outdated
mv ~/.m2/settings.xml ~/.m2/settings.xml.backup."${date}" | ||
fi | ||
|
||
cp .ci-temp/release-settings.xml ~/.m2/settings.xml |
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.
you have variables for these files
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.
We have variables for these files but we can use this only if we run those in Travis CI
.
eg: MVN_SETTINGS=${TRAVIS_HOME}/.m2/settings.xml
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.
we should not use CI specific variables, this script should be executable on any CI and any local.
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.
I think exact path might work better then variable - it is almost unlikely to change
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.
what I mean is that several lines above it is
TEMP_SETTING="./.ci-temp/release-settings.xml"
SETTING="~/.m2/settings.xml"
so this command can be just cp $TEMP_SETTING $SETTING
and duplcation is avoided
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.
now I see it, thanks a lot.
done.
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.
see comments above
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.
items:
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.
items:
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.
items:
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.
I will merge this as soon as CI pass.
@strkkk , if you have more items, please keep raising them, we will fix them in next PRs
replace SONATYPE_USER | ||
replace SONATYPE_PWD | ||
replace GPG_PASSPHRASE | ||
replace GPG_KEY |
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.
Shouldn't these names be more Checkstyle specific? IE: CS_GPG_KEY or CHECKSTYLE_GPG_KEY
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.
I am not sure for now to put CS as prefix for all.
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.
Aren't these just environment variables the user has set on their machine going by checkForVariable
? Are these environment variables needed some place else besides for this script?
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.
Just a variables, not used in other scripts.
We never named variables with CS prefix, I not sure that we should start now.
Resolves: Issue #11726
release-settings.xml
file.prepare-setting.sh
and it copyrelease-setting.xml
to.ci-temp
.ci-temp
~/.m2/settigns.xml.backup.{date}
~/.m2/settigns.xml