From b390a919a32e0838a9843c4f1e9050ca9cf17d23 Mon Sep 17 00:00:00 2001 From: Alexander Dzhoganov Date: Tue, 30 Dec 2014 00:10:18 +0200 Subject: [PATCH] Create build.sh --- build.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000..250297524b --- /dev/null +++ b/build.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +echo Commit hash: ${ghprbActualCommit} +echo Changes in this commit: +export COMMIT_CHANGES=`git diff-tree --no-commit-id --name-only -r ${ghprbActualCommit}` +echo ${COMMIT_CHANGES} + +wget https://raw.githubusercontent.com/KSP-CKAN/CKAN/master/bin/ckan-validate.py -O ckan-validate.py +wget https://raw.githubusercontent.com/KSP-CKAN/CKAN/master/CKAN.schema -O CKAN.schema +chmod a+x ckan-validate.py +./ckan-validate.py ${COMMIT_CHANGES} + +# fetch latest ckan.exe +wget -O ckan.exe http://ci.ksp-ckan.org:8080/job/CKAN/lastSuccessfulBuild/artifact/ckan.exe + +# create a dummy KSP install +mkdir dummy_ksp +echo Version 0.90.0 > dummy_ksp/readme.txt +mkdir dummy_ksp/GameData + +mono --debug ckan.exe ksp add default "`pwd`/dummy_ksp" +mono --debug ckan.exe ksp default default +mono --debug ckan.exe update + +for f in ${COMMIT_CHANGES} +do + mono --debug ckan.exe install -c $f +done