Skip to content

Commit

Permalink
chore: try to separate gas-report script into .sh
Browse files Browse the repository at this point in the history
  • Loading branch information
3esmit committed Feb 24, 2024
1 parent 6ec6954 commit 069810f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions gas-report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
forge test --gas-report 2>&1 | (tee /dev/tty | awk '/Test result:/ {found=1; buffer=""; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf "%s", buffer}' > .gas-report)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"lint:sol": "forge fmt --check && pnpm solhint {script,src,test,certora}/**/*.sol",
"prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore",
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore",
"gas:report": "forge test --gas-report 2>&1 | (tee /dev/tty | awk '/Test result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report)"
"gas:report": "./gas-report.sh"
}
}

0 comments on commit 069810f

Please sign in to comment.