Sha256: 1e32d2b17ab96f8b5bc2301fd27daee7200f6f39a7b03997ddd1fdd1f0e6e18f

Contents?: true

Size: 688 Bytes

Versions: 7

Compression:

Stored size: 688 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require "pathname"
require "yaml"

# Find myself.
build_file = Pathname.new(__FILE__).realpath

# Find the target details.
target_file =  build_file.to_s.chomp("build") + "target.yml"
target = YAML.load_file(target_file)

# Generate sketch.
bin_file = build_file.to_s.chomp("build") + "bin/denko"
sketch_folder = `#{bin_file} sketch serial --target #{target["name"]}`

# Compile it.
compile_successful = system "arduino-cli compile -b #{target["fqbn"]} #{sketch_folder}"

# Upload it.
if compile_successful
  system "arduino-cli upload -v -p #{target["port"]} -b #{target["fqbn"]} #{sketch_folder}"
end

# Delete it.
system "rm -r #{sketch_folder}"

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
denko-0.13.6 build
denko-0.13.5 build
denko-0.13.4 build
denko-0.13.3 build
denko-0.13.2 build
denko-0.13.1 build
denko-0.13.0 build