rake: add panelization target
This commit is contained in:
parent
9594faa71b
commit
a1cb82c00f
|
@ -32,3 +32,4 @@ fabrication
|
|||
|
||||
# panel files
|
||||
panel.*
|
||||
panel
|
||||
|
|
16
Rakefile
16
Rakefile
|
@ -66,6 +66,13 @@ task :bom => boms
|
|||
CLEAN.include([ "#{name}.versioned.xml" ])
|
||||
CLOBBER.include(boms)
|
||||
|
||||
desc "generate panel"
|
||||
PANEL_DIR = "panel"
|
||||
panels = ["panel.kicad_pcb", "panel.kicad_pro", "panel.top.png", "panel.bot.png"]
|
||||
task :panel => panels
|
||||
CLOBBER.include(panels)
|
||||
CLOBBER.include(PANEL_DIR)
|
||||
|
||||
# ===============
|
||||
# file generation
|
||||
# ===============
|
||||
|
@ -106,3 +113,12 @@ desc "generate BOM"
|
|||
rule ".bom.csv" => ".versioned.xml" do |t|
|
||||
sh "kibom #{t.source} #{t.name}"
|
||||
end
|
||||
|
||||
desc "generate panel"
|
||||
rule panels[0] => ["#{name}.versioned.kicad_pcb", "#{name}.versioned.kicad_pro", "#{name}.versioned.kicad_sch", "panel.json"] do |t|
|
||||
sh "kikit panelize -p #{t.prerequisites[3]} #{t.prerequisites[0]} #{panels[0]}"
|
||||
sh "pcbdraw --silent #{t.name} --dpi 600 #{panels[2]}"
|
||||
sh "pcbdraw --silent #{t.name} --dpi 600 --back #{panels[3]}"
|
||||
sh "sed --in-place 's/\"missing_courtyard\": \"warning\"/\"missing_courtyard\": \"ignore\"/g' #{panels[1]}" # the mouse bites don't have a courtyard
|
||||
sh "kikit fab jlcpcb --drc --assembly --missingError --schematic #{t.prerequisites[2]} #{panels[0]} #{PANEL_DIR}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue