AkaLrz commented on code in PR #32396:
URL: https://github.com/apache/shardingsphere/pull/32396#discussion_r1711982081
##########
.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh:
##########
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+# Get file directory and output directory
+current="${{ github.workspace }}"
+
+# Use loop to get root directory, if module doesn't change, the loop needn't
change
Review Comment:
> > Because the shell script location on
`.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh`.
I use the variable current to get current path. It have the standard position
on the 5 layers from root directory. Thus I use 5 times for loop to get the
root directory which `shardingsphere`. I think the script module position won't
be changed thus I think it's the most easy way to get root directory.
>
> I see ... in fact, "${{ github.workspace }}" is the built-in variable in
action. this is the root path of this project.we do not need loop 5 times to
get the path.
Got u. For the change do i just need to remove `# Use loop to get root
directory, if module doesn't change, the loop needn't change
for i in {1..5}; do
current=$(dirname "$current")
done` and leave `current="${{ github.workspace }}"`. That will make sure the
current is the root path of the project instead of script path
`.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]