git hooks test

This commit is contained in:
Marvin Zhang
2021-12-30 13:51:53 +08:00
parent 4cebdfaed4
commit 27e03778e9

11
scripts/validate-backend.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
IFS=$'\n'
pattern=^replace
content=$(cat ./backend/go.mod)
for line in $content
do
if [[ $line =~ $pattern ]]; then
exit 1
fi
done