You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "lujiajing1126 (via GitHub)" <gi...@apache.org> on 2023/06/07 10:14:33 UTC

[GitHub] [skywalking-go] lujiajing1126 commented on a diff in pull request #56: Support running e2e tests on MacOS

lujiajing1126 commented on code in PR #56:
URL: https://github.com/apache/skywalking-go/pull/56#discussion_r1221325157


##########
test/plugins/run.sh:
##########
@@ -155,16 +155,24 @@ for framework_version in $frameworks; do
   cp -rf ${scenario_home}/* ${case_home}
   cd ${case_home}
 
-  # replace go version
-  sed -i "s/^go [0-9]*\.[0-9]*/go ${go_version}/" go.mod
   # append the module name(for go1.20, module name cannot be same in same workspace)
   mod_case_name=$(echo "${case_name}" | sed 's/\//_/g; s/\./_/g; s/-/_/g')
   mod_name=$(head -n 1 go.mod | cut -d " " -f 2)
-  sed -i "s/^module /module ${mod_case_name}\//" go.mod
-  find . -name "*.go" -type f -exec sed -i "s|${mod_name}|${mod_case_name}/${mod_name}|g" {} \;
-
-  # ajust the plugin replace path
-  sed -i -E '/^replace/ s#(\.\./)#\1../#' go.mod
+  if [ $(uname) = 'Darwin' ]; then

Review Comment:
   I would suggest moving conditional check to the top of the file, for example with 'alias' or creating a new function?



-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org