From cbdb8719db8db178a199f98c44c9350b2a99dae3 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 30 Jun 2015 12:40:17 -0400 Subject: [PATCH 1/3] Inform GitHub that .recipe files are written in Shell syntax. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..9e3949f34 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.recipe linguist-language=Shell From f66379b347b48f51add1262557d33151e485f6db Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 30 Jun 2015 13:22:47 -0400 Subject: [PATCH 2/3] Add a script that lints all recipes added/changed since origin/HEAD. --- lint-new-recipes.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 lint-new-recipes.sh diff --git a/lint-new-recipes.sh b/lint-new-recipes.sh new file mode 100755 index 000000000..50d1e62aa --- /dev/null +++ b/lint-new-recipes.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Lints all the recipes created / modified since upstream HEAD. +git remote add real_origin https://github.com/haikuports/haikuports.git || true +git fetch real_origin + +files=$(git diff $(git rev-parse --abbrev-ref HEAD) real_origin/master --numstat | awk '{print $3}') +for file in $files; do + if [ -e "$file" ] && [[ "$file" == *recipe ]]; then + baseName=$(basename $file) + portName=${baseName::-7} + haikuporter $@ --lint $portName + if [ $? -ne 0 ]; then exit 1; fi + fi +done From ec16504c37719ddebdc09b6e60c25cb9f5dcc4a1 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 30 Jun 2015 14:12:48 -0400 Subject: [PATCH 3/3] Create .travis.yml. --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..28642157c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: python +python: "2.7" +install: + - cd .. + - git clone https://github.com/haikuports/haikuporter.git --depth=1 + - cd haikuports + - PATH=$PATH:../haikuporter && export PATH + - printf 'TREE_PATH="'`pwd`'"\nPACKAGER="Nobody "\nTARGET_ARCHITECTURE="x86"\n' >haikuports.conf + - wget https://github.com/waddlesplash/haiku-licenses/archive/master.zip && unzip master.zip +script: + - ./lint-new-recipes.sh --config=haikuports.conf --licenses=haiku-licenses-master