Skip to content

Commit

Permalink
found good version parse, using it everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
flowstate committed Dec 10, 2024
1 parent e45f8fd commit 2604ab2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- name: Set preview version
run: |
BASE_VERSION=$(grep -o "__version__.*" socketsync/__init__.py | awk '{print $3}' | tr -d "'")
BASE_VERSION=$(python -c "from socketsync import __version__; print(__version__)")
PREVIEW_VERSION="${BASE_VERSION}.dev${{ github.event.pull_request.number }}${{ github.event.pull_request.commits }}"
echo "VERSION=${PREVIEW_VERSION}" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
id: version_check
run: |
# Get version from current PR
PR_VERSION=$(grep -o '__version__ = "[^"]*"' socketsync/__init__.py | cut -d'"' -f2)
PR_VERSION=$(python -c "from socketsync import __version__; print(__version__)")
echo "Debug PR version: $PR_VERSION"
echo "PR_VERSION=${PR_VERSION}" >> $GITHUB_ENV
# Get version from main branch
git checkout origin/main
MAIN_VERSION=$(grep -o '__version__ = "[^"]*"' socketsync/__init__.py | cut -d'"' -f2)
MAIN_VERSION=$(python -c "from socketsync import __version__; print(__version__)")
echo "Debug main version: $MAIN_VERSION"
echo "MAIN_VERSION=${MAIN_VERSION}" >> $GITHUB_ENV
Expand Down

0 comments on commit 2604ab2

Please sign in to comment.