Skip to content

Commit 0ec1489

Browse files
authored
Merge pull request #445 from sej7278/master
Fix for 1.6.10 version detection
2 parents 5a83288 + 737a3f1 commit 0ec1489

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Arduino.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,10 @@ endif
280280
# Arduino version number
281281

282282
ifndef ARDUINO_VERSION
283-
# Remove all the decimals, and right-pad with zeros, and finally grab the first 3 bytes.
284-
# Works for 1.0 and 1.0.1
283+
# Remove all the decimals, remove anything before/including ":", remove anything after/including "+" and finally grab the last 5 bytes.
284+
# Works for 1.0 and 1.0.1 and 1.6.10 and debian-style 2:1.0.5+dfsg2-4
285285
VERSION_FILE := $(ARDUINO_DIR)/lib/version.txt
286-
AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/$$/0000/' | head -c3)
286+
AUTO_ARDUINO_VERSION := $(shell [ -e $(VERSION_FILE) ] && cat $(VERSION_FILE) | sed -e 's/^[0-9]://g' -e 's/[.]//g' -e 's/\+.*//g' | head -c5)
287287
ifdef AUTO_ARDUINO_VERSION
288288
ARDUINO_VERSION = $(AUTO_ARDUINO_VERSION)
289289
$(call show_config_variable,ARDUINO_VERSION,[AUTODETECTED])

HISTORY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ The following is the rough list of changes that went into different versions.
55
I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list.
66

77
### In Development
8-
-Tweak: Updated Linux instructions and sync documentation from the old blog(), README.md and Arduino.mk (https://github.com/az-z)
8+
- Tweak: Updated Linux instructions and sync documentation from the old blog(), README.md and Arduino.mk (https://github.com/az-z)
9+
- Fix: Updated CXXFLAGS_STD to match upstream 1.6 (issue #424) (https://github.com/calvinli)
10+
- Fix: Added support for attiny core's use of chip instead of cpu in submenus (https://github.com/straccio)
11+
- Fix: ARDUINO_VERSION can cope with the longer 1.6.10 version string (issue #444) (https://github.com/sej7278)
912

1013
### 1.5.1 (Debian version: 1.5-3) (2016-02-22)
1114

0 commit comments

Comments
 (0)