File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,22 +19,12 @@ jobs:
1919 - name : Checkout repository
2020 uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2121
22- - name : Set up Python
23- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
24- with :
25- python-version : " 3.12"
26-
27- - name : Install dependencies
28- run : |
29- python -m pip install --upgrade pip
30- python -m pip install -e .
31-
3222 - name : Extract default tool versions
3323 id : versions
3424 run : |
35- # Get versions from Python
36- CLANG_FORMAT_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_FORMAT_VERSION ; print(DEFAULT_CLANG_FORMAT_VERSION )")
37- CLANG_TIDY_VERSION=$(python -c "from cpp_linter_hooks.util import DEFAULT_CLANG_TIDY_VERSION ; print(DEFAULT_CLANG_TIDY_VERSION )")
25+ # Get versions directly from versions.py (no package install needed)
26+ CLANG_FORMAT_VERSION=$(python3 -c "import sys; sys.path.insert(0, 'cpp_linter_hooks'); from versions import CLANG_FORMAT_VERSIONS ; print(CLANG_FORMAT_VERSIONS[-1] )")
27+ CLANG_TIDY_VERSION=$(python3 -c "import sys; sys.path.insert(0, 'cpp_linter_hooks'); from versions import CLANG_TIDY_VERSIONS ; print(CLANG_TIDY_VERSIONS[-1] )")
3828
3929 # Export to GitHub Actions environment for subsequent steps
4030 echo "CLANG_FORMAT_VERSION=$CLANG_FORMAT_VERSION" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments