Skip to content

Commit

Permalink
♻️ update workflows to standardize package version extraction by norm…
Browse files Browse the repository at this point in the history
…alizing package paths
  • Loading branch information
yezz123 committed Dec 25, 2024
1 parent b75fce4 commit 800cef9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:

- name: Extract package version
run: |
export PACKAGE_VERSION=$(grep -o '".*"' ./${{ matrix.package }}/${{ matrix.package }}/__init__.py | tr -d '"')
PKG_PATH=$(echo ${{ matrix.package }} | tr '-' '_')
export PACKAGE_VERSION=$(grep -o '".*"' ./${{ matrix.package }}/$PKG_PATH/__init__.py | tr -d '"')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo $PACKAGE_VERSION
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
- name: Extract package version
if: matrix.package == 'pragma-sdk'
run: |
export PACKAGE_VERSION=$(grep -o '".*"' ./${{ matrix.package }}/${{ matrix.package }}/__init__.py | tr -d '"')
PKG_PATH=$(echo ${{ matrix.package }} | tr '-' '_')
export PACKAGE_VERSION=$(grep -o '".*"' ./${{ matrix.package }}/$PKG_PATH/__init__.py | tr -d '"')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
echo $PACKAGE_VERSION
- name: Build Docker Image
Expand Down

0 comments on commit 800cef9

Please sign in to comment.