1
1
require "arduino_ci/host"
2
2
3
3
DESIRED_ARDUINO_IDE_VERSION = "1.8.5" . freeze
4
+ USE_BUILDER = false
4
5
5
6
module ArduinoCI
6
7
@@ -18,7 +19,7 @@ def force_install_location
18
19
def from_forced_install
19
20
ret = new
20
21
builder = File . join ( force_install_location , "arduino-builder" )
21
- if File . exist? builder
22
+ if USE_BUILDER && File . exist? ( builder )
22
23
ret . base_cmd = [ builder ]
23
24
ret . requires_x = false
24
25
else
@@ -59,20 +60,19 @@ def autolocate
59
60
return ret
60
61
end
61
62
62
- # # AAARRRRGGGGHHH
63
- # # Even though arduino-builder is an awesome CLI for Arduino,
64
- # # ALL THE OPTIONS ARE DIFFERENT (single vs double dash for flags)
65
- # # USELESS FOR THE TIME BEING
66
- #
67
- # posix_place = Host.which("arduino-builder")
68
- # unless posix_place.nil?
69
- # ret = new
70
- # ret.base_cmd = [posix_place]
71
- # ret.lib_dir = File.join(ENV['HOME'], "Sketchbook") # assume linux
72
- # ret.requires_x = false
73
- # # https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/how-to-install-a-library
74
- # return ret
75
- # end
63
+ # AAARRRRGGGGHHH
64
+ # Even though arduino-builder is an awesome CLI for Arduino,
65
+ # ALL THE OPTIONS ARE DIFFERENT (single vs double dash for flags)
66
+ # USELESS FOR THE TIME BEING
67
+ posix_place = Host . which ( "arduino-builder" )
68
+ if USE_BUILDER && !posix_place . nil?
69
+ ret = new
70
+ ret . base_cmd = [ posix_place ]
71
+ ret . lib_dir = File . join ( ENV [ 'HOME' ] , "Sketchbook" ) # assume linux
72
+ ret . requires_x = false
73
+ # https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/how-to-install-a-library
74
+ return ret
75
+ end
76
76
77
77
posix_place = Host . which ( "arduino" )
78
78
unless posix_place . nil?
0 commit comments