rake: export gerber in a directory

This commit is contained in:
King Kévin 2022-05-18 17:11:53 +02:00
parent 531206e2b3
commit 479d64bc6a
1 changed files with 4 additions and 3 deletions

View File

@ -115,9 +115,10 @@ end
desc "archive gerbers"
rule ".brd.zip" => ".versioned.lht" do |t|
base = File.basename(t.source, ".versioned.lht")
puts base
sh "pcb-rnd -x cam gerber:JLC_PCB --outfile #{base}.brd #{t.source} 2> /dev/null"
sh "zip --quiet #{t.name} #{base}.brd.xln #{base}.brd.a* #{base}.brd.g*"
dir = "fabrication"
sh "mkdir #{dir}" unless File.directory?(dir)
sh "pcb-rnd -x cam gerber:JLC_PCB --outfile #{dir}/#{base}.brd #{t.source} 2> /dev/null"
sh "zip --quiet #{t.name} #{dir}/*"
end
desc "generate BOM file from schematic"