-
-
Notifications
You must be signed in to change notification settings - Fork 712
ENH: Add a script to apply another script to all remotes #781
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
ENH: Add a script to apply another script to all remotes #781
Conversation
| cmake_remote_flags+=(-D'Module_'$remote':BOOL=ON' ) | ||
| done | ||
|
|
||
| cmake ${cmake_remote_flags[@]} ../ITK |
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.
Completing all CMake configuration steps is not necessary, so should we just extract (if that is possible) the relevant parts from the CMakeLists.txt to clone the remotes in the ITK source tree?
| $script | ||
|
|
||
| # Add the files, adding filters if necessary | ||
| git add -u *.txt ./*.cmake ./*.rst ./*.py ./*.yml ./*.c ./*.cxx ./*.h ./*.hxx ./*.wrap |
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.
Removed files are not added to the commit.
Otherwise, we could assume that a git add . could be done since it will be a new branch, with no files and changes other than those applied by the script.
|
|
||
| # Commit and push to the feature branch | ||
| git commit -m $commit_message | ||
| git push --quiet https://$username:$password@github.com/$username/$repository_basename $feature_branch |
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.
- Rather that keeping the remote URLs from the
list_candidate_remotesfunction, I do get the URL again inapply_script_and_push_remotes. I though it was easier than keeping a list from the former method, then finding the appropriate element for the remote at issue (partly because the URL includes the username and password for the push to be done). If you feel there is an alternative to this, please go ahead.
| read -p "username: " username | ||
| read -p "password: " -s password | ||
|
|
||
| script=$1 |
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.
The full path of the script to be applied must be provided. Otherwise, we could assume that only scripts that dwell in Utilities will be applied, since they anyways will be worthwhile maintaining there for the records and for the sake of our philosophy.
|
|
||
| script=$1 | ||
| feature_branch=$2 | ||
| commit_message=$3 |
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.
The commit message must be provided explicitly. Many of the ITKv5 preparation scripts do it all at once: do the changes, add them and commit with a message contained in the script itself.
We should consider whether we prefer that the add and commit steps will generally be contained in the script that is applied.
|
As discussed some time ago by mail. Took me a while to gather some time to do it, but here it goes. Just as a reminder, this script can be used to apply changes such as the ones done for the ITKv5 preparation, or changes like removing the AppVeyor, Circle CI, and Travis CI files and adding the A few thoughts in-line, and other additional ones (some may require careful consideration, and further work, so we should assume it will not be immediate to answer/address them):
Many of the branch collision cases are covered by @fbudin69500 's Slicer 3D extensions script. So it could be of help. Once these aspects fixed, we could think of updating the UpdateRequiredITKVersionInRemoteModules.sh so that given the remote module name, it updates the @maekclena This is related to the remote module maintenance script, so you may want to have a look/improve it. Thanks. |
45a0756 to
bc90003
Compare
Add a script to apply another script to all remotes. This script is intended to ease the extension of toolkit-wide changes that are applied through a bash script to the remote modules that dwell in/are referenced from the toolkit's `Modules/Remote` module.
bc90003 to
ac8f80e
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.
LGTM
|
Thanks Hans. The PR had a few unresolved comments and requests for comment, but I think it is fine. We will improve it as we use it. |
Add a script to apply another script to all remotes.
This script is intended to ease the extension of toolkit-wide changes that
are applied through a bash script to the remote modules that dwell in/are
referenced from the toolkit's
Modules/Remotemodule.PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.