Skip to content

Commit 7cc53ae

Browse files
authored
Merge pull request #130 from leanprover-community/develop
possible bug: if new toolchain exists but mathlib uses old toolchain...?
2 parents cc7472a + 4ca811d commit 7cc53ae

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

action.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,32 @@ outputs:
8282
runs:
8383
using: "composite"
8484
steps:
85+
- name: find dependencies
86+
id: find-dependencies
87+
run: | # bat
88+
: Find dependencies
89+
file_path="lake-manifest.json"
90+
91+
if [ ! -f "$file_path" ]; then
92+
echo "File not found: $file_path"
93+
exit 1
94+
fi
95+
96+
line_count=$(wc -l < "$file_path")
97+
echo "Number of lines in $file_path: $line_count"
98+
99+
if [ "$line_count" -ge 10 ]; then
100+
echo "the repository has some dependencies."
101+
echo "outcome=has-depencency" >> $GITHUB_OUTPUT
102+
else
103+
echo "the repository has no dependencies."
104+
echo "outcome=no-depencency" >> $GITHUB_OUTPUT
105+
fi
106+
shell: bash
107+
working-directory: ${{ inputs.lake_package_directory }}
108+
85109
- name: Update lean-toolchain
110+
if: ${{ steps.find-dependencies.outputs.outcome == 'no-depencency' }}
86111
run: |
87112
: Update lean-toolchain
88113
node ${{ github.action_path }}/scripts/getLatest.js

0 commit comments

Comments
 (0)