Skip to content

Commit fdb54a8

Browse files
committed
add the ability to disable the arduino builder which we just added :(
1 parent b730e42 commit fdb54a8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

lib/arduino_ci/arduino_installation.rb

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require "arduino_ci/host"
22

33
DESIRED_ARDUINO_IDE_VERSION = "1.8.5".freeze
4+
USE_BUILDER = false
45

56
module ArduinoCI
67

@@ -18,7 +19,7 @@ def force_install_location
1819
def from_forced_install
1920
ret = new
2021
builder = File.join(force_install_location, "arduino-builder")
21-
if File.exist? builder
22+
if USE_BUILDER && File.exist? builder
2223
ret.base_cmd = [builder]
2324
ret.requires_x = false
2425
else
@@ -59,20 +60,19 @@ def autolocate
5960
return ret
6061
end
6162

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
7676

7777
posix_place = Host.which("arduino")
7878
unless posix_place.nil?

0 commit comments

Comments
 (0)