File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,15 @@ jobs:
1818 - name : Check version increment
1919 id : version_check
2020 run : |
21+ python -m pip install --upgrade pip
22+ pip install packaging
23+
2124 # Get version from current PR
2225 PR_VERSION=$(grep -o "__version__.*" socketsecurity/__init__.py | awk '{print $3}' | tr -d "'")
2326 echo "PR_VERSION=$PR_VERSION" >> $GITHUB_ENV
2427
2528 # Get version from main branch
26- git checkout origin/main
27- MAIN_VERSION=$(grep -o "__version__.*" socketsecurity/__init__.py | awk '{print $3}' | tr -d "'")
29+ MAIN_VERSION=$(git show origin/main:socketsecurity/__init__.py | grep -o "__version__.*" | awk '{print $3}' | tr -d "'")
2830 echo "MAIN_VERSION=$MAIN_VERSION" >> $GITHUB_ENV
2931
3032 # Compare versions using Python
8789 issue_number: prNumber,
8890 body: `❌ **Version Check Failed**\n\nPlease increment...`
8991 });
90- }
92+ }
You can’t perform that action at this time.
0 commit comments