Skip to content

Commit

Permalink
ci: add precommit script
Browse files Browse the repository at this point in the history
  • Loading branch information
Indah Juliani committed Aug 19, 2024
1 parent 6334e56 commit cce1295
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env sh
error=false

if ./mvnw notice:check; then
echo "Notice OK"
else
error=true
echo "Fix notice"
./mvnw notice:generate
fi
if ./mvnw license:check; then
echo "License OK"
else
error=true
echo "Fix license"
./mvnw license:format
fi
if $error; then
exit 1;
fi

0 comments on commit cce1295

Please sign in to comment.