Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | set -eu
|
---|
4 |
|
---|
5 | OUTPUT="$(pwd)/sizes.csv"
|
---|
6 |
|
---|
7 | echo "Tag;Date;Parser;Generator" > $OUTPUT
|
---|
8 |
|
---|
9 | cd $(dirname $(dirname $0))
|
---|
10 |
|
---|
11 | git tag | while read TAG
|
---|
12 | do
|
---|
13 |
|
---|
14 | git checkout -q tags/$TAG
|
---|
15 |
|
---|
16 | DATE=$(git log -1 --date=short --pretty=format:%cd)
|
---|
17 | PARSER_SIZE=$(arduino --verify examples/JsonParserExample/JsonParserExample.ino 2>/dev/null | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
|
---|
18 |
|
---|
19 | if [ -e 'examples/JsonGeneratorExample/JsonGeneratorExample.ino' ]; then
|
---|
20 | GENERATOR_SIZE=$(arduino --verify examples/JsonGeneratorExample/JsonGeneratorExample.ino 2>/dev/null | grep -e 'Sketch uses' | sed 's/.*uses \([0-9]*\).\([0-9]\+\).*/\1\2/')
|
---|
21 | else
|
---|
22 | GENERATOR_SIZE=""
|
---|
23 | fi
|
---|
24 |
|
---|
25 | echo $TAG
|
---|
26 | if [ ! -z "$PARSER_SIZE" ]
|
---|
27 | then
|
---|
28 | echo "JsonParserExample = $PARSER_SIZE bytes"
|
---|
29 | else
|
---|
30 | echo "JsonParserExample compilation failed."
|
---|
31 | fi
|
---|
32 |
|
---|
33 | if [ ! -z "$GENERATOR_SIZE" ]
|
---|
34 | then
|
---|
35 | echo "JsonGeneratorExample = $GENERATOR_SIZE bytes"
|
---|
36 | else
|
---|
37 | echo "JsonGeneratorExample compilation failed."
|
---|
38 | fi
|
---|
39 |
|
---|
40 | echo "$TAG;$DATE;$PARSER_SIZE;$GENERATOR_SIZE" >> $OUTPUT
|
---|
41 |
|
---|
42 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.