File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -ex
2
2
3
3
PR_NUMBER=$1
4
- VERSION=PR-$PR_NUMBER
4
+ BUILD_NUMBER=$2
5
+ VERSION=` grep version= platform.txt | sed ' s/version=//g' `
5
6
6
7
PWD=` pwd`
7
8
FOLDERNAME=` basename $PWD `
8
9
THIS_SCRIPT_NAME=` basename $0 `
9
- FILENAME=package_samd-PR- $PR_NUMBER .tar.bz2
10
+ FILENAME=package_samd-b ${BUILD_NUMBER} .tar.bz2
10
11
11
12
rm -f $FILENAME
12
13
13
14
# 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
15
16
16
17
cd ..
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
18
19
cd -
19
20
20
21
mv ../$FILENAME .
@@ -24,8 +25,9 @@ SIZE=`wc -c $FILENAME | awk '{ print $1 }'`
24
25
25
26
cat extras/package_index.json.PR.template |
26
27
sed 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} / |
28
30
sed s/%%FILENAME%%/${FILENAME} / |
29
31
sed 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
31
33
Original file line number Diff line number Diff line change 10
10
},
11
11
"platforms": [
12
12
{
13
- "name": "Arduino SAMD core - Pull request build num. %%PR_NUMBER%% ",
13
+ "name": "Arduino SAMD core - Pull request #%%PR_NUMBER%% ( build %%BUILD_NUMBER%%) ",
14
14
"architecture": "samd",
15
15
"version": "%%VERSION%%",
16
16
"category": "Arduino",
Original file line number Diff line number Diff line change 19
19
# For more info:
20
20
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
21
21
22
- name=Arduino SAMD (32-bits ARM Cortex-M0+) Boards
22
+ name=SAMD Pull request #40 (Build 873)
23
23
version=1.6.0
24
24
25
25
# Compile variables
You can’t perform that action at this time.
0 commit comments