File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ install: make prerequisites
1313script : " make -j VERBOSE=1 NINJA=1 $TARGET"
1414
1515env :
16- - TARGET="check-vera check-cpp"
16+ - TARGET="check-signed-off check- vera check-cpp"
1717 - TARGET="build.linux test-js-precommit"
1818 - TARGET=build.mcu_stm32f3
1919 - TARGET=build.mcu_stm32f4
Original file line number Diff line number Diff line change 1515# See the License for the specific language governing permissions and
1616# limitations under the License.
1717
18- commit_hash=` git show -s --format=%H HEAD`
19- author_name=` git show -s --format=%an HEAD`
20- author_email=` git show -s --format=%ae HEAD`
18+ parent_hashes=(` git show -s --format=%p HEAD | head -1` )
19+
20+ if [ " ${# parent_hashes[@]} " -eq 1 ]
21+ then
22+ commit_hash=` git show -s --format=%h HEAD | head -1`
23+ elif [ " ${# parent_hashes[@]} " -eq 2 ]
24+ then
25+ if git merge-base --is-ancestor " ${parent_hashes[@]} "
26+ then
27+ commit_hash=${parent_hashes[1]}
28+ else
29+ echo " $0 : cannot handle merge commit where first parent ${parent_hashes[0]} is not ancestor of second parent ${parent_hashes[1]} "
30+ exit 1
31+ fi
32+ else
33+ echo " $0 : cannot handle commit with ${# parent_hashes[@]} parents ${parent_hashes[@]} "
34+ exit 1
35+ fi
36+
37+ author_name=` git show -s --format=%an $commit_hash `
38+ author_email=` git show -s --format=%ae $commit_hash `
2139required_signed_off_by_line=" JerryScript-DCO-1.0-Signed-off-by: $author_name $author_email "
22- actual_signed_off_by_line=` git show -s --format=%B HEAD | sed ' /^$/d' | tail -n 1`
40+ actual_signed_off_by_line=` git show -s --format=%B $commit_hash | sed ' /^$/d' | tail -n 1`
2341
2442if [ " $actual_signed_off_by_line " != " $required_signed_off_by_line " ]
2543then
You can’t perform that action at this time.
0 commit comments