Skip to content

Commit

Permalink
Update version.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Ghostuhin <[email protected]>
  • Loading branch information
TorinAsakura authored Aug 16, 2023
1 parent b5f3919 commit 6d28683
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ jobs:
- name: Install jq
run: sudo apt-get install -y jq

- name: Check for @atls version changes
id: check-versions
- name: Check for version changes in @atls dependencies
run: |
FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep 'package.json')
for FILE in $FILES; do
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r HEAD | grep 'package.json')
for FILE in $CHANGED_FILES; do
# Extract old and new version for @atls dependencies
OLD_VERSIONS=$(git show ${{ github.event.pull_request.base.sha }}:$FILE | jq '.dependencies | with_entries(select(.key | startswith("@atls/"))) | .[]')
OLD_VERSIONS=$(git show HEAD~1:$FILE | jq '.dependencies | with_entries(select(.key | startswith("@atls/"))) | .[]' || echo "")
NEW_VERSIONS=$(cat $FILE | jq '.dependencies | with_entries(select(.key | startswith("@atls/"))) | .[]')
# Check if old and new versions are different
Expand Down

0 comments on commit 6d28683

Please sign in to comment.