Commit f0e54195 authored by Fabio Utzig's avatar Fabio Utzig Committed by David Brown
Browse files

Use travis env variable to control check-signed-off-by

Instead of trying to determine current branch using git, just rely
on travis to know if this is a PR and if it is not, don't do
signed-off-by checking.

Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent 8e96b835
Loading
Loading
Loading
Loading
+1 −1
Changes for .travis.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ language: rust

script:
  - set -e
  - ./scripts/check-signed-off-by.sh
  - if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then ./scripts/check-signed-off-by.sh; fi
  - cd sim
  - cargo test
  - cargo test --features sig-rsa
−4
Changes for scripts/check-signed-off-by.sh: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -14,10 +14,6 @@

# this retrieves the merge commit created by GH
parents=(`git log -n 1 --format=%p HEAD`)
branch=(`git rev-parse --abbrev-ref HEAD`)

# Should only run in PR branches
[[ ${branch} == "master" ]] && exit 0

if [[ "${#parents[@]}" -ne 2 ]]; then
  echo "This PR's merge commit is missing a parent!"