Skip to content

Commit cf39e6d

Browse files
committed
reduce workflow to enable finer debugging
1 parent a230b58 commit cf39e6d

File tree

1 file changed

+1
-42
lines changed

1 file changed

+1
-42
lines changed

.github/workflows/diff-javadoc.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,47 +24,6 @@ jobs:
2424
distribution: temurin
2525
cache: gradle
2626

27-
- name: Changed Modules
28-
id: changed-modules
29-
run: |
30-
git diff --name-only HEAD~1 | xargs printf -- '--changed-git-paths %s\n' | xargs ./gradlew writeChangedProjects --output-file-path=modules.json --only-firebase-sdks
31-
echo "run=$(cat modules.json | sed "s/[]\"[]//g" | sed "s/,/\n/g" | xargs printf -- "%s:kotlinDoc ")" >> $GITHUB_OUTPUT
32-
33-
- name: Build
34-
# Certain SDKs won't export docs, make a blank folder to diff if that's the case
35-
run: mkdir build && ./gradlew ${{ steps.changed-modules.outputs.run }} --debug
36-
37-
- name: Move original docs
38-
run: mv build ~/diff/modified
39-
40-
- uses: actions/checkout@v3
41-
with:
42-
ref: ${{ github.base_ref }}
43-
4427
- name: Build
4528
# Certain SDKs won't export docs, make a blank folder to diff if that's the case
46-
run: mkdir build && ./gradlew ${{ steps.changed-modules.outputs.run }}
47-
48-
- name: Move modified docs
49-
run: mv build ~/diff/original
50-
51-
- name: Diff docs
52-
run: >
53-
`# Recursively diff directories, including new files, git style, with 3 lines of context`
54-
diff -wEburN ~/diff/original ~/diff/modified
55-
`# Remove the first line and new file signifier of the output`
56-
| tail -n +2
57-
`# Replace the diff new file signifier with the end and start of a new codeblock`
58-
| sed "s/^diff.*$/\`\`\`\\n\`\`\`diff/g"
59-
`# Add a collapsable block, summary, and start the first code block on the first line`
60-
| sed "1s/^/<details>\\n<summary>Javadoc Changes:<\/summary>\\n\\n\`\`\`diff\\n/"
61-
`# Close the final code block and close the collapsable on the final line`
62-
| sed "$ s/$/\\n\`\`\`\\n<\/details>/"
63-
`# Write to diff.md for later`
64-
> diff.md
65-
66-
- name: Add comment
67-
continue-on-error: true
68-
uses: mshick/add-pr-comment@a65df5f64fc741e91c59b8359a4bc56e57aaf5b1
69-
with:
70-
message-path: diff.md
29+
run: ./gradlew :firebase-common:kotlinDoc --debug

0 commit comments

Comments
 (0)