Skip to content

Commit a7f8da9

Browse files
authored
tools/preview_new_release.sh: Signoff commits (#2485)
1 parent 0636bfe commit a7f8da9

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Diff for: tools/preview_new_release.sh

+9-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function uncomment_version()
3030
}
3131

3232
# Apply ocamlformat on a project, update the '.ocamlformat' and commit.
33+
# $signoff_opts must be set.
3334
function apply_fmt()
3435
{
3536
local version=$1 commit_msg=$2
@@ -38,7 +39,7 @@ function apply_fmt()
3839
$dune build @fmt --auto-promote &> "$log_dir/$project.log" || true
3940
uncomment_version "$version" .ocamlformat
4041
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"
4243
IGNORE_REVS+=("# Upgrade to OCamlformat $version")
4344
IGNORE_REVS+=("$(git rev-parse HEAD)")
4445
fi
@@ -134,6 +135,12 @@ while IFS=, read git_platform namespace project opts; do
134135
*) dune=dune ;;
135136
esac
136137

138+
if [[ $opts = *"<signoff>"* ]]; then
139+
signoff_opts=--signoff
140+
else
141+
signoff_opts=--no-signoff
142+
fi
143+
137144
# Lines to insert into .git-blame-ignore-revs. Updated by [apply_fmt].
138145
IGNORE_REVS=()
139146

@@ -158,7 +165,7 @@ Changelog can be found here: https://github.com/ocaml-ppx/ocamlformat/blob/main/
158165
if ! [[ $opts = *"<no-ignore-revs>"* ]] && [[ "${#IGNORE_REVS}" -gt 0 ]]; then
159166
printf "%s\n" "${IGNORE_REVS[@]}" >> .git-blame-ignore-revs
160167
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"
162169
fi
163170

164171
echo "Pushing to $fork"

Diff for: tools/projects.data

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
github,mirage,irmin,
22
github,mirage,mirage,
3-
github,ocaml,dune,<no-ignore-revs>
3+
github,ocaml,dune,<no-ignore-revs><signoff>
44
github,ocaml,ocaml-lsp,
55
github,ocaml,odoc,
6-
github,ocaml-ppx,ppxlib,
6+
github,ocaml-ppx,ppxlib,<signoff>
77
github,ocsigen,js_of_ocaml,
88
github,realworldocaml,mdx,
99
github,tarides,dune-release,

0 commit comments

Comments
 (0)