diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6c73b9f..74dc6b4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,17 +14,25 @@ jobs: with: ref: ${{ github.ref }} - - name: Setup requirements and run script + - name: Setup requirements run: | pip install rich pip install json_source_map # wget https://raw.githubusercontent.com/robproject/fsjd/main/frappe_schema_json_diff.py - export TABLE_MODE=1 - export GIT_EXTERNAL_DIFF=./frappe_schema_json_diff.py - chmod +x ./frappe_schema_json_diff.py - echo ${{ github.base_ref }} - echo ${{ github.ref }} + echo "GIT_EXTERNAL_DIFF=./frappe_schema_json_diff.py" >> $GITHUB_ENV + echo "TABLE_MODE=1" >> $GITHUB_ENV + + - name: Diff on push + if: github.event_name == 'push' + run: | + git --no-pager diff HEAD~1 HEAD + + - name: Diff on pull + if: github.event_name == 'pull_request' + run: | + git fetch origin %{{ github.base_ref }}:${{ github.base_ref }} + git --no-pager diff HEAD~1 HEAD git --no-pager diff ${{ github.base_ref }}...HEAD diff --git a/test_files/new_doctype_modified.json b/test_files/new_doctype_modified.json index fa65212..71ecb97 100644 --- a/test_files/new_doctype_modified.json +++ b/test_files/new_doctype_modified.json @@ -9,7 +9,6 @@ "new_docfield_1", "new_docfield_2", "new_docfield_3", - "new_docfield_4", "new_docfield_5", "new_docfield_6", "new_docfield_8"