superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 240 forks source link

[WORKFLOW] Fix the counting of files #2008

Closed DemoYeti closed 2 months ago

DemoYeti commented 3 months ago
find "pr-packages/$pr_number" -maxdepth 1 -type f -printf '.' | wc -c

The above is an overly complicated way to count files. This PR replaces it with a simpler method using ls.

ls -1 "pr-packages/$pr_number" | wc -l
hellwolf commented 3 months ago

Thanks for the report, now I remember why I changed it to using find:

image

hellwolf commented 3 months ago

Let me read into shellcheck and see if there is any merit of that recommendation

hellwolf commented 2 months ago

https://github.com/koalaman/shellcheck/issues/2950 I will follow up this one and make an upstream contribution.

I will close this one for now.

Thanks!