Skip to content

Commit c738a85

Browse files
committed
More versioning fun
1 parent 55e0b41 commit c738a85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Set preview version
1616
run: |
1717
BASE_VERSION=$(grep -o "__version__.*" socketsecurity/__init__.py | awk '{print $3}' | tr -d "'")
18-
SHORT_SHA=$(git rev-parse --short HEAD)
19-
PREVIEW_VERSION="${BASE_VERSION}.dev${GITHUB_PR_NUMBER}.post${SHORT_SHA}"
18+
SHORT_SHA=$(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7)
19+
PREVIEW_VERSION="${BASE_VERSION}.dev${{ github.event.pull_request.number }}.post${SHORT_SHA}"
2020
echo "VERSION=${PREVIEW_VERSION}" >> $GITHUB_ENV
2121
2222
# Update version in __init__.py

0 commit comments

Comments
 (0)