-
-
Notifications
You must be signed in to change notification settings - Fork 754
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
ICU-22324 Update Maven migration scripts #2661
ICU-22324 Update Maven migration scripts #2661
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.
nice! thanks!
icu4j/maven-migration/toMaven.sh
Outdated
} | ||
|
||
function moveOrRename() { | ||
SRC=$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.
No point in defining SRC and DST if then mv uses $1 and $1
But even if we use $ everywhere, it would be nice to add a comment to (all) the functions with the parameters (so that one knows the order).
If I'm a Windows guy I might not know if mv
is src dst
or dst src
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.
Done.
icu4j/maven-migration/toMaven.sh
Outdated
SRC=$1 | ||
DEST=$2 | ||
|
||
cp -R "$1" "$2" |
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.
Same, no point in defining them.
BUT!
If you choose to define (and use) them, then you can do
local SRC=...
local DST=...
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.
Done.
icu4j/maven-migration/toMaven.sh
Outdated
|
||
cp -R "$1" "$2" | ||
} | ||
|
||
function safeMoveDir() { | ||
export FOLDER_NAME=$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.
s/export/local/
(I know that's what it was like, but meantime I learned better :-)
https://tldp.org/LDP/abs/html/localvar.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.
Done.
icu4j/maven-migration/toMaven.sh
Outdated
DIR=$1 | ||
PATTERN=$2 | ||
|
||
find "$DIR" -type f -name "$PATTERN" -exec rm {} \; |
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.
Nitpick: collapse multiple spaces
And comment.
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.
Done.
icu4j/maven-migration/toMaven.sh
Outdated
removeEclipseProjectFiles main/tests/packaging | ||
|
||
# At this point this folder should be empty | ||
# So remove if empty (-d) should work | ||
rm -d main/core/src/test/java/com/ibm/icu/dev/test/serializable | ||
} | ||
|
||
function moveToolsFile() { |
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.
Nitpick: combine the 2 functions into one?
(moveFilesInTools
and moveToolsFile
)?
And comment.
I understand it is a matter of taste...
But I think it would be more readable if it's all in one, with comments.
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.
Done.
Please don't remove Need to 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.
Reviewed, thank you!
M.
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.
Thank you!
9468f7b
to
d3e8d90
Compare
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
I updated the script to include files that moved directories since c7f227b. I didn't include files that were added or deleted since we can expect those changes to be handled by any version control system without getting confused.
Steps to reproduce
Here's effectively how I did my checking of the files across ICU 73.2 ("icu73") and the latest on upstream
main
("icu74"):Checklist