Skip to content

Commit

Permalink
fix(misc/list-gnophers): make script work when called from any direct…
Browse files Browse the repository at this point in the history
…ory (gnolang#1308)

\+ use a tmpdir for the csv file.

@moul 

<details><summary>Contributors' checklist...</summary>

- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x ] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
  • Loading branch information
thehowl authored and moul committed Nov 14, 2023
1 parent bc281eb commit 6275618
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions misc/list-gnophers/main.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/sh

main() {
cd "$(dirname "$0")"
cd ../..
fname="$(mktemp --tmpdir gno_file_commits.XXXXXXXXXX.csv)"
for file in $(list_gno_files); do
extract_file_metadata $file
done > gno_file_commits.csv
echo
cat gno_file_commits.csv | sort_by_date | unique_by_author
done > "$fname"
cat "$fname" | sort_by_date | unique_by_author
}

list_gno_files() {
Expand Down

0 comments on commit 6275618

Please sign in to comment.