aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xextras/pack.hourlybuild.bash51
-rwxr-xr-xextras/pack.pullrequest.bash50
-rwxr-xr-xextras/pack.release.bash33
-rw-r--r--extras/package_index.json.Hourly.template72
-rw-r--r--extras/package_index.json.PR.template72
5 files changed, 278 insertions, 0 deletions
diff --git a/extras/pack.hourlybuild.bash b/extras/pack.hourlybuild.bash
new file mode 100755
index 0000000..b3a269f
--- /dev/null
+++ b/extras/pack.hourlybuild.bash
@@ -0,0 +1,51 @@
+#!/bin/bash -ex
+
+# pack.*.bash - Bash script to help packaging avr core releases.
+# Copyright (c) 2015 Arduino LLC. All right reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+BUILD_NUMBER=$1
+CURR_TIME=`date "+%Y-%m-%d %H:%M"`
+CURR_TIME_SED=`date "+%Y\\-%m\\-%d %H:%M"`
+VERSION=9.9.9-Hourly
+
+PWD=`pwd`
+FOLDERNAME=`basename $PWD`
+THIS_SCRIPT_NAME=`basename $0`
+FILENAME=package_avr-hourly-b${BUILD_NUMBER}.tar.bz2
+
+rm -f $FILENAME
+
+# Change name in platform.txt
+sed -i "s/name=.*/name=SAMD Hourly Build ${BUILD_NUMBER} (${CURR_TIME})/" platform.txt
+
+cd ..
+tar --transform "s|$FOLDERNAME|avr-hourly_b${BUILD_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.Hourly.template |
+sed "s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/" |
+sed "s/%%CURR_TIME%%/${CURR_TIME_SED}/" |
+sed "s/%%VERSION%%/${VERSION}/" |
+sed "s/%%FILENAME%%/${FILENAME}/" |
+sed "s/%%CHECKSUM%%/${CHKSUM}/" |
+sed "s/%%SIZE%%/${SIZE}/" > package_avr-hourly-build_index.json
+
diff --git a/extras/pack.pullrequest.bash b/extras/pack.pullrequest.bash
new file mode 100755
index 0000000..64f5b95
--- /dev/null
+++ b/extras/pack.pullrequest.bash
@@ -0,0 +1,50 @@
+#!/bin/bash -ex
+
+# pack.*.bash - Bash script to help packaging avr core releases.
+# Copyright (c) 2015 Arduino LLC. All right reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+PR_NUMBER=$1
+BUILD_NUMBER=$2
+VERSION=`grep version= platform.txt | sed 's/version=//g'`
+
+PWD=`pwd`
+FOLDERNAME=`basename $PWD`
+THIS_SCRIPT_NAME=`basename $0`
+FILENAME=package_avr-b${BUILD_NUMBER}.tar.bz2
+
+rm -f $FILENAME
+
+# Change name in platform.txt
+sed -i "s/name=.*/name=SAMD Pull request #${PR_NUMBER} (Build ${BUILD_NUMBER})/" platform.txt
+
+cd ..
+tar --transform "s|$FOLDERNAME|avr-PR${PR_NUMBER}_b${BUILD_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/%%BUILD_NUMBER%%/${BUILD_NUMBER}/ |
+sed s/%%VERSION%%/${VERSION}-build-${BUILD_NUMBER}/ |
+sed s/%%FILENAME%%/${FILENAME}/ |
+sed s/%%CHECKSUM%%/${CHKSUM}/ |
+sed s/%%SIZE%%/${SIZE}/ > package_avr-b${BUILD_NUMBER}_index.json
+
diff --git a/extras/pack.release.bash b/extras/pack.release.bash
new file mode 100755
index 0000000..a2999d5
--- /dev/null
+++ b/extras/pack.release.bash
@@ -0,0 +1,33 @@
+#!/bin/bash -ex
+
+# pack.*.bash - Bash script to help packaging avr core releases.
+# Copyright (c) 2015 Arduino LLC. All right reserved.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+VERSION=`grep version= platform.txt | sed 's/version=//g'`
+
+PWD=`pwd`
+FOLDERNAME=`basename $PWD`
+THIS_SCRIPT_NAME=`basename $0`
+
+rm -f avr-$VERSION.tar.bz2
+
+cd ..
+tar --transform "s|$FOLDERNAME|$FOLDERNAME-$VERSION|g" --exclude=extras/** --exclude=.git* --exclude=.idea -cjf avr-$VERSION.tar.bz2 $FOLDERNAME
+cd -
+
+mv ../avr-$VERSION.tar.bz2 .
+
diff --git a/extras/package_index.json.Hourly.template b/extras/package_index.json.Hourly.template
new file mode 100644
index 0000000..49c71dd
--- /dev/null
+++ b/extras/package_index.json.Hourly.template
@@ -0,0 +1,72 @@
+{
+ "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 AVR core - Hourly build",
+ "architecture": "avr",
+ "version": "%%VERSION%%",
+ "category": "Arduino",
+ "url": "http://downloads.arduino.cc/Hourly/avr/%%FILENAME%%",
+ "archiveFileName": "%%FILENAME%%",
+ "checksum": "SHA-256:%%CHECKSUM%%",
+ "size": "%%SIZE%%",
+ "boards": [
+ {"name": "Arduino Yún"},
+ {"name": "Arduino/Genuino Uno"},
+ {"name": "Arduino Uno WiFi"},
+ {"name": "Arduino Diecimila"},
+ {"name": "Arduino Nano"},
+ {"name": "Arduino/Genuino Mega"},
+ {"name": "Arduino MegaADK"},
+ {"name": "Arduino Leonardo"},
+ {"name": "Arduino Leonardo Ethernet"},
+ {"name": "Arduino/Genuino Micro"},
+ {"name": "Arduino Esplora"},
+ {"name": "Arduino Mini"},
+ {"name": "Arduino Ethernet"},
+ {"name": "Arduino Fio"},
+ {"name": "Arduino BT"},
+ {"name": "Arduino LilyPadUSB"},
+ {"name": "Arduino Lilypad"},
+ {"name": "Arduino Pro"},
+ {"name": "Arduino ATMegaNG"},
+ {"name": "Arduino Robot Control"},
+ {"name": "Arduino Robot Motor"},
+ {"name": "Arduino Gemma"},
+ {"name": "Adafruit Circuit Playground"},
+ {"name": "Arduino Yún Mini"},
+ {"name": "Arduino Industrial 101"},
+ {"name": "Linino One"}
+ ],
+ "toolsDependencies": [
+ {
+ "packager": "arduino",
+ "name": "avr-gcc",
+ "version": "4.9.2-atmel3.5.4-arduino2"
+ },
+ {
+ "packager": "arduino",
+ "name": "avrdude",
+ "version": "6.3.0-arduino9"
+ },
+ {
+ "packager": "arduino",
+ "name": "arduinoOTA",
+ "version": "1.1.1"
+ }
+ ]
+ }
+ ],
+ "tools": [
+ ]
+ }
+ ]
+}
diff --git a/extras/package_index.json.PR.template b/extras/package_index.json.PR.template
new file mode 100644
index 0000000..17cfa50
--- /dev/null
+++ b/extras/package_index.json.PR.template
@@ -0,0 +1,72 @@
+{
+ "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 AVR core - Pull request #%%PR_NUMBER%% (build %%BUILD_NUMBER%%)",
+ "architecture": "avr",
+ "version": "%%VERSION%%",
+ "category": "Arduino",
+ "url": "http://downloads.arduino.cc/PR/a/%%FILENAME%%",
+ "archiveFileName": "%%FILENAME%%",
+ "checksum": "SHA-256:%%CHECKSUM%%",
+ "size": "%%SIZE%%",
+ "boards": [
+ {"name": "Arduino Yún"},
+ {"name": "Arduino/Genuino Uno"},
+ {"name": "Arduino Uno WiFi"},
+ {"name": "Arduino Diecimila"},
+ {"name": "Arduino Nano"},
+ {"name": "Arduino/Genuino Mega"},
+ {"name": "Arduino MegaADK"},
+ {"name": "Arduino Leonardo"},
+ {"name": "Arduino Leonardo Ethernet"},
+ {"name": "Arduino/Genuino Micro"},
+ {"name": "Arduino Esplora"},
+ {"name": "Arduino Mini"},
+ {"name": "Arduino Ethernet"},
+ {"name": "Arduino Fio"},
+ {"name": "Arduino BT"},
+ {"name": "Arduino LilyPadUSB"},
+ {"name": "Arduino Lilypad"},
+ {"name": "Arduino Pro"},
+ {"name": "Arduino ATMegaNG"},
+ {"name": "Arduino Robot Control"},
+ {"name": "Arduino Robot Motor"},
+ {"name": "Arduino Gemma"},
+ {"name": "Adafruit Circuit Playground"},
+ {"name": "Arduino Yún Mini"},
+ {"name": "Arduino Industrial 101"},
+ {"name": "Linino One"}
+ ],
+ "toolsDependencies": [
+ {
+ "packager": "arduino",
+ "name": "avr-gcc",
+ "version": "4.9.2-atmel3.5.4-arduino2"
+ },
+ {
+ "packager": "arduino",
+ "name": "avrdude",
+ "version": "6.3.0-arduino9"
+ },
+ {
+ "packager": "arduino",
+ "name": "arduinoOTA",
+ "version": "1.1.1"
+ }
+ ]
+ }
+ ],
+ "tools": [
+ ]
+ }
+ ]
+}