Skip to content

Commit

Permalink
.sync/workflows/leaf/codeql.yml: Update CodeQL plugin from .pytool to…
Browse files Browse the repository at this point in the history
… BaseTools

The CodeQL plugin moved from .pytool to BaseTools in the Mu Basecore
202311 update. This change first looks for the plugin in BaseTools
and falls back to the prior .pytool location if it is not found for
backward compatibility with some earlier release branches that have
not picked up the change.

Eventually, the .pytool fallback can be removed.

Signed-off-by: Michael Kubacki <[email protected]>
  • Loading branch information
makubacki committed Jan 22, 2024
1 parent dc54ac0 commit 0d94bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .sync/workflows/leaf/codeql-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ jobs:
from pathlib import Path
# Find the plugin directory that contains the CodeQL plugin
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('BaseTools/Plugin/CodeQL'))
if not plugin_dir:
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
# This should only be found once
if len(plugin_dir) == 1:
Expand Down
4 changes: 3 additions & 1 deletion .sync/workflows/leaf/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ jobs:
from pathlib import Path
# Find the plugin directory that contains the CodeQL plugin
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('BaseTools/Plugin/CodeQL'))
if not plugin_dir:
plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
# This should only be found once
if len(plugin_dir) == 1:
Expand Down

0 comments on commit 0d94bf8

Please sign in to comment.