File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash -ex
22
33PR_NUMBER=$1
4- VERSION=PR-$PR_NUMBER
4+ BUILD_NUMBER=$2
5+ VERSION=` grep version= platform.txt | sed ' s/version=//g' `
56
67PWD=` pwd`
78FOLDERNAME=` basename $PWD `
89THIS_SCRIPT_NAME=` basename $0 `
9- FILENAME=package_samd-PR- $PR_NUMBER .tar.bz2
10+ FILENAME=package_samd-b ${BUILD_NUMBER} .tar.bz2
1011
1112rm -f $FILENAME
1213
1314# Change name in platform.txt
14- sed -i " s/name=.*/name=SAMD Pull request Build ${PR_NUMBER} /" platform.txt
15+ sed -i " s/name=.*/name=SAMD Pull request # ${PR_NUMBER} ( Build ${BUILD_NUMBER} ) /" platform.txt
1516
1617cd ..
17- tar --transform " s|$FOLDERNAME |samd-PR- $ PR_NUMBER |g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME
18+ tar --transform " s|$FOLDERNAME |samd-PR${ PR_NUMBER} _b ${BUILD_NUMBER} |g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf $FILENAME $FOLDERNAME
1819cd -
1920
2021mv ../$FILENAME .
@@ -24,8 +25,9 @@ SIZE=`wc -c $FILENAME | awk '{ print $1 }'`
2425
2526cat extras/package_index.json.PR.template |
2627sed s/%%PR_NUMBER%%/${PR_NUMBER} / |
27- sed s/%%VERSION%%/${VERSION} / |
28+ sed s/%%BUILD_NUMBER%%/${BUILD_NUMBER} / |
29+ sed s/%%VERSION%%/${VERSION} -build-${BUILD_NUMBER} / |
2830sed s/%%FILENAME%%/${FILENAME} / |
2931sed s/%%CHECKSUM%%/${CHKSUM} / |
30- sed s/%%SIZE%%/${SIZE} / > package_samd-PR- ${PR_NUMBER } _index.json
32+ sed s/%%SIZE%%/${SIZE} / > package_samd-b ${BUILD_NUMBER } _index.json
3133
Original file line number Diff line number Diff line change 1010 },
1111 "platforms": [
1212 {
13- "name": "Arduino SAMD core - Pull request build num. %%PR_NUMBER%% ",
13+ "name": "Arduino SAMD core - Pull request #%%PR_NUMBER%% ( build %%BUILD_NUMBER%%) ",
1414 "architecture": "samd",
1515 "version": "%%VERSION%%",
1616 "category": "Arduino",
Original file line number Diff line number Diff line change 1919# For more info:
2020# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
2121
22- name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards
22+ name=SAMD Pull request #40 (Build 873)
2323version=1.6.0
2424
2525# Compile variables
You can’t perform that action at this time.
0 commit comments