Create build.sh

This commit is contained in:
Alexander Dzhoganov 2014-12-30 00:10:18 +02:00
parent cfc9b3207a
commit b390a919a3
1 changed files with 28 additions and 0 deletions

28
build.sh Normal file
View File

@ -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