Context:
Scripted diffs are a way to automate some types of reformatting or refactoring changes. When a commit message matches a specific format (begins with scripted-diff:
), CI will run commit-script-check.sh.
sed
is platform dependent. One significant difference is when using the -i
flag. On BSD (eg. macOS), you have to insert an empty string, but with GNU sed (used by Travis), this is compatible.
example of a working command for these two platforms-
macOS: sed -i '' 's/a oneshot/an addrfetch/g' src/chainparams.cpp
Travis: sed -i 's/a oneshot/an addrfetch/g' src/chainparams.cpp
Task:
Add logic to the commit-script-check.sh
to detect if the scripted diff is using the BSD sed syntax and print a helpful error message.
Useful skills:
Bash
Want to work on this issue?
For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.