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
13
13
script : " make -j VERBOSE=1 NINJA=1 $TARGET"
14
14
15
15
env :
16
- - TARGET="check-vera check-cpp"
16
+ - TARGET="check-signed-off check- vera check-cpp"
17
17
- TARGET="build.linux test-js-precommit"
18
18
- TARGET=build.mcu_stm32f3
19
19
- TARGET=build.mcu_stm32f4
Original file line number Diff line number Diff line change 15
15
# See the License for the specific language governing permissions and
16
16
# limitations under the License.
17
17
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 `
21
39
required_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`
23
41
24
42
if [ " $actual_signed_off_by_line " != " $required_signed_off_by_line " ]
25
43
then
You can’t perform that action at this time.
0 commit comments