Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
#!/usr/bin/env bash
set -euo pipefail
files_added=`git diff --cached --name-status`
project_paths=`find source -mindepth 1 -maxdepth 1 -type d`
while read -r project_path; do
project_name=`echo $project_path | sed -e 's/^source\///g'`
re="$project_path.*\.kicad_pcb"
if [[ $files_added =~ $re ]]
then
make "exports/plots/$project_name-pcb.pdf"
make "production/gbr/$project_name.zip"
make "production/pos/$project_name.csv"
git add "exports/plots/$project_name-pcb.pdf"
# the directory containing the Gerbers is a side effect of the zip creation
git add "production/gbr/$project_name/"
git add "production/pos/$project_name.csv"
fi
re="$project_path.*\.kicad_sch"
if [[ $files_added =~ $re ]]
then
make "exports/plots/$project_name-sch.pdf"
make "production/bom/$project_name.csv"
git add "exports/plots/$project_name-sch.pdf"
git add "production/bom/$project_name.csv"
fi
done <<< "$project_paths"
c64dedd7aThis file is pinned to the selected release. Download the original to open it in your design tool.