@@ -30,6 +30,7 @@ function uncomment_version()
30
30
}
31
31
32
32
# Apply ocamlformat on a project, update the '.ocamlformat' and commit.
33
+ # $signoff_opts must be set.
33
34
function apply_fmt()
34
35
{
35
36
local version=$1 commit_msg=$2
@@ -38,7 +39,7 @@ function apply_fmt()
38
39
$dune build @fmt --auto-promote & > " $log_dir /$project .log" || true
39
40
uncomment_version " $version " .ocamlformat
40
41
if ! git diff --shortstat --exit-code; then
41
- git commit --quiet --all -m " $commit_msg "
42
+ git commit --quiet --all $signoff_opts -m " $commit_msg "
42
43
IGNORE_REVS+=(" # Upgrade to OCamlformat $version " )
43
44
IGNORE_REVS+=(" $( git rev-parse HEAD) " )
44
45
fi
@@ -134,6 +135,12 @@ while IFS=, read git_platform namespace project opts; do
134
135
* ) dune=dune ;;
135
136
esac
136
137
138
+ if [[ $opts = * " <signoff>" * ]]; then
139
+ signoff_opts=--signoff
140
+ else
141
+ signoff_opts=--no-signoff
142
+ fi
143
+
137
144
# Lines to insert into .git-blame-ignore-revs. Updated by [apply_fmt].
138
145
IGNORE_REVS=()
139
146
@@ -158,7 +165,7 @@ Changelog can be found here: https://github.com/ocaml-ppx/ocamlformat/blob/main/
158
165
if ! [[ $opts = * " <no-ignore-revs>" * ]] && [[ " ${# IGNORE_REVS} " -gt 0 ]]; then
159
166
printf " %s\n" " ${IGNORE_REVS[@]} " >> .git-blame-ignore-revs
160
167
git add .git-blame-ignore-revs
161
- git commit --quiet -m " Update .git-blame-ignore-revs"
168
+ git commit --quiet $signoff_opts -m " Update .git-blame-ignore-revs"
162
169
fi
163
170
164
171
echo " Pushing to $fork "
0 commit comments