File tree Expand file tree Collapse file tree 3 files changed +86
-1
lines changed Expand file tree Collapse file tree 3 files changed +86
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ PR_NUMBER=$1
4+ VERSION=PR-$PR_NUMBER
5+
6+ PWD=` pwd`
7+ FOLDERNAME=` basename $PWD `
8+ THIS_SCRIPT_NAME=` basename $0 `
9+ FILENAME=package_samd-PR-$PR_NUMBER .tar.bz2
10+
11+ rm -f $FILENAME
12+
13+ # Change name in platform.txt
14+ sed -i " s/name=.*/name=SAMD Pull request Build ${PR_NUMBER} /" platform.txt
15+
16+ cd ..
17+ tar --transform " s|$FOLDERNAME |samd-PR-$PR_NUMBER |g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME
18+ cd -
19+
20+ mv ../$FILENAME .
21+
22+ CHKSUM=` sha256sum $FILENAME | awk ' { print $1 }' `
23+ SIZE=` wc -c $FILENAME | awk ' { print $1 }' `
24+
25+ cat extras/package_index.json.PR.template |
26+ sed s/%%PR_NUMBER%%/${PR_NUMBER} / |
27+ sed s/%%VERSION%%/${VERSION} / |
28+ sed s/%%FILENAME%%/${FILENAME} / |
29+ sed s/%%CHECKSUM%%/${CHKSUM} / |
30+ sed s/%%SIZE%%/${SIZE} / > package_samd-PR-${PR_NUMBER} _index.json
31+
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ THIS_SCRIPT_NAME=`basename $0`
99rm -f samd-$VERSION .tar.bz2
1010
1111cd ..
12- tar --transform " s|$FOLDERNAME |$VERSION |g" --exclude=.git --exclude=.idea --exclude=$THIS_SCRIPT_NAME -cjf samd-$VERSION .tar.bz2 $FOLDERNAME
12+ tar --transform " s|$FOLDERNAME |$FOLDERNAME - $ VERSION |g" --exclude=extras/ ** --exclude=.git * --exclude=.idea -cjf samd-$VERSION .tar.bz2 $FOLDERNAME
1313cd -
1414
1515mv ../samd-$VERSION .tar.bz2 .
Original file line number Diff line number Diff line change 1+ {
2+ "packages": [
3+ {
4+ "name": "arduino-beta",
5+ "maintainer": "Arduino Betatesting",
6+ "websiteURL": "http://www.arduino.cc/",
7+ "email": "packages@arduino.cc",
8+ "help": {
9+ "online": "http://www.arduino.cc/en/Reference/HomePage"
10+ },
11+ "platforms": [
12+ {
13+ "name": "Arduino SAMD core - Pull request build num. %%PR_NUMBER%%",
14+ "architecture": "samd",
15+ "version": "%%VERSION%%",
16+ "category": "Arduino",
17+ "url": "http://downloads.arduino.cc/PR/samd/%%FILENAME%%",
18+ "archiveFileName": "%%FILENAME%%",
19+ "checksum": "SHA-256:%%CHECKSUM%%",
20+ "size": "%%SIZE%%",
21+ "boards": [
22+ {
23+ "name": "Arduino Zero"
24+ }
25+ ],
26+ "toolsDependencies": [
27+ {
28+ "packager": "arduino",
29+ "name": "arm-none-eabi-gcc",
30+ "version": "4.8.3-2014q1"
31+ },
32+ {
33+ "packager": "arduino",
34+ "name": "bossac",
35+ "version": "1.5-arduino"
36+ },
37+ {
38+ "packager": "arduino",
39+ "name": "openocd",
40+ "version": "0.9.0-arduino"
41+ },
42+ {
43+ "packager": "arduino",
44+ "name": "CMSIS",
45+ "version": "4.0.0-atmel"
46+ }
47+ ]
48+ }
49+ ],
50+ "tools": [
51+ ]
52+ }
53+ ]
54+ }
You can’t perform that action at this time.
0 commit comments