mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-24 17:18:51 +02:00
travis: Check if recipes have trailing whitespace.
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
|
sudo: false
|
||||||
language: python
|
language: python
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
install:
|
install:
|
||||||
- cd ..
|
- cd .. && git clone https://github.com/haikuports/haikuporter.git --depth=1 && cd haikuports
|
||||||
- git clone https://github.com/haikuports/haikuporter.git --depth=1
|
|
||||||
- cd haikuports
|
|
||||||
- PATH=$PATH:../haikuporter && export PATH
|
- PATH=$PATH:../haikuporter && export PATH
|
||||||
- printf 'TREE_PATH="'`pwd`'"\nPACKAGER="Nobody <server@fake>"\nTARGET_ARCHITECTURE="x86"\n' >haikuports.conf
|
- printf 'TREE_PATH="'`pwd`'"\nPACKAGER="Nobody <server@fake>"\nTARGET_ARCHITECTURE="x86"\n' >haikuports.conf
|
||||||
- wget https://github.com/waddlesplash/haiku-licenses/archive/master.zip && unzip master.zip
|
- wget https://github.com/waddlesplash/haiku-licenses/archive/master.zip && unzip master.zip
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ git fetch real_origin
|
|||||||
files=$(git diff $(git rev-parse --abbrev-ref HEAD) real_origin/master --numstat | awk '{print $3}')
|
files=$(git diff $(git rev-parse --abbrev-ref HEAD) real_origin/master --numstat | awk '{print $3}')
|
||||||
for file in $files; do
|
for file in $files; do
|
||||||
if [ -e "$file" ] && [[ "$file" == *recipe ]]; then
|
if [ -e "$file" ] && [[ "$file" == *recipe ]]; then
|
||||||
|
LINES=$(grep -l '[[:blank:]]$' $file)
|
||||||
|
if [ ! -z "$LINES" ]; then
|
||||||
|
echo "Trailing whitespace in '$file'."; exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
baseName=$(basename $file)
|
baseName=$(basename $file)
|
||||||
portName=${baseName::-7}
|
portName=${baseName::-7}
|
||||||
haikuporter $@ --lint $portName
|
haikuporter $@ --lint $portName
|
||||||
|
|||||||
Reference in New Issue
Block a user