diff --git a/.github/workflows/JsonGenerator.yml b/.github/workflows/JsonGenerator.yml index d4fcdbb4..81538b4b 100644 --- a/.github/workflows/JsonGenerator.yml +++ b/.github/workflows/JsonGenerator.yml @@ -225,6 +225,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF diff --git a/.github/workflows/LuaGenerator.yml b/.github/workflows/LuaGenerator.yml index d257c6f2..84e0fdbf 100644 --- a/.github/workflows/LuaGenerator.yml +++ b/.github/workflows/LuaGenerator.yml @@ -187,6 +187,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF diff --git a/.github/workflows/PluginSkeletonGenerator.yml b/.github/workflows/PluginSkeletonGenerator.yml index f7bd83d0..a01d1bea 100644 --- a/.github/workflows/PluginSkeletonGenerator.yml +++ b/.github/workflows/PluginSkeletonGenerator.yml @@ -293,6 +293,14 @@ jobs: "baseline_${name}" "artifacts/PluginSkeleton-${name}" \ > "diffs/${name}.diff" || true + # Strip the differing roots from the diff's ---/+++ file header lines so both sides share an identical path + sed -i -E \ + -e "s#^(--- )baseline_${name}/#\\1#" \ + -e "s#^(\\+\\+\\+ )artifacts/PluginSkeleton-${name}/#\\1#" \ + -e "s#^(--- )artifacts/PluginSkeleton-${name}/#\\1#" \ + -e "s#^(\\+\\+\\+ )baseline_${name}/#\\1#" \ + "diffs/${name}.diff" + if [[ -s "diffs/${name}.diff" ]]; then npx --yes diff2html-cli@5.2.15 -i file -F "site/$RUN_DIR/diff/${name}.html" -- "diffs/${name}.diff" echo "$name" >> diffs/plugins_with_diffs.txt diff --git a/.github/workflows/ProxyStubGenerator.yml b/.github/workflows/ProxyStubGenerator.yml index fbea28c2..0540a1a9 100644 --- a/.github/workflows/ProxyStubGenerator.yml +++ b/.github/workflows/ProxyStubGenerator.yml @@ -233,6 +233,14 @@ jobs: > "diffs/combined.diff" || true fi + # Strip the differing root from the diff's ---/+++ file header lines so both sides share an identical path + sed -i -E \ + -e 's#^(--- )baseline/#\1#' \ + -e 's#^(\+\+\+ )generated/#\1#' \ + -e 's#^(--- )generated/#\1#' \ + -e 's#^(\+\+\+ )baseline/#\1#' \ + "diffs/combined.diff" + if [[ -s "diffs/combined.diff" ]]; then HAS_DIFF="true" export HAS_DIFF # Update export so Python sees "true"