Skip to content
Snippets Groups Projects
Commit 8fe631f9 authored by Cristian Maglie's avatar Cristian Maglie
Browse files

Added pull request builder scripts

parent 8c4c3b97
No related branches found
No related tags found
No related merge requests found
#!/bin/bash -ex
PR_NUMBER=$1
VERSION=PR-$PR_NUMBER
PWD=`pwd`
FOLDERNAME=`basename $PWD`
THIS_SCRIPT_NAME=`basename $0`
FILENAME=package_samd-PR-$PR_NUMBER.tar.bz2
rm -f $FILENAME
# Change name in platform.txt
sed -i "s/name=.*/name=SAMD Pull request Build ${PR_NUMBER}/" platform.txt
cd ..
tar --transform "s|$FOLDERNAME|samd-PR-$PR_NUMBER|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME
cd -
mv ../$FILENAME .
CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'`
SIZE=`wc -c $FILENAME | awk '{ print $1 }'`
cat extras/package_index.json.PR.template |
sed s/%%PR_NUMBER%%/${PR_NUMBER}/ |
sed s/%%VERSION%%/${VERSION}/ |
sed s/%%FILENAME%%/${FILENAME}/ |
sed s/%%CHECKSUM%%/${CHKSUM}/ |
sed s/%%SIZE%%/${SIZE}/ > package_samd-PR-${PR_NUMBER}_index.json
...@@ -9,7 +9,7 @@ THIS_SCRIPT_NAME=`basename $0` ...@@ -9,7 +9,7 @@ THIS_SCRIPT_NAME=`basename $0`
rm -f samd-$VERSION.tar.bz2 rm -f samd-$VERSION.tar.bz2
cd .. cd ..
tar --transform "s|$FOLDERNAME|$VERSION|g" --exclude=.git --exclude=.idea --exclude=$THIS_SCRIPT_NAME -cjf samd-$VERSION.tar.bz2 $FOLDERNAME tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf samd-$VERSION.tar.bz2 $FOLDERNAME
cd - cd -
mv ../samd-$VERSION.tar.bz2 . mv ../samd-$VERSION.tar.bz2 .
......
{
"packages": [
{
"name": "arduino-beta",
"maintainer": "Arduino Betatesting",
"websiteURL": "http://www.arduino.cc/",
"email": "packages@arduino.cc",
"help": {
"online": "http://www.arduino.cc/en/Reference/HomePage"
},
"platforms": [
{
"name": "Arduino SAMD core - Pull request build num. %%PR_NUMBER%%",
"architecture": "samd",
"version": "%%VERSION%%",
"category": "Arduino",
"url": "http://downloads.arduino.cc/PR/samd/%%FILENAME%%",
"archiveFileName": "%%FILENAME%%",
"checksum": "SHA-256:%%CHECKSUM%%",
"size": "%%SIZE%%",
"boards": [
{
"name": "Arduino Zero"
}
],
"toolsDependencies": [
{
"packager": "arduino",
"name": "arm-none-eabi-gcc",
"version": "4.8.3-2014q1"
},
{
"packager": "arduino",
"name": "bossac",
"version": "1.5-arduino"
},
{
"packager": "arduino",
"name": "openocd",
"version": "0.9.0-arduino"
},
{
"packager": "arduino",
"name": "CMSIS",
"version": "4.0.0-atmel"
}
]
}
],
"tools": [
]
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment