[ci] fix script not working on non-sh shells #296

Closed
Lizzie wants to merge 2 commits from fix-license-script-not-working-on-sh into master
Showing only changes of commit 02ad1b83c3 - Show all commits

View file

@ -1,15 +1,11 @@
#!/bin/bash -e
#!/bin/sh -e
HEADER="$(cat "$PWD/.ci/license/header.txt")"
echo "Getting branch changes"
BRANCH=`git rev-parse --abbrev-ref HEAD`
COMMITS=`git log ${BRANCH} --not master --pretty=format:"%h"`
RANGE="${COMMITS[${#COMMITS[@]}-1]}^..${COMMITS[0]}"
FILES=`git diff-tree --no-commit-id --name-only ${RANGE} -r`
#FILES=$(git diff --name-only master)
BASE=`git merge-base master HEAD`
FILES=`git diff --name-only $BASE`
echo "Done"