26 lines
835 B
Bash
26 lines
835 B
Bash
|
#!/bin/bash
|
||
|
# Usage:
|
||
|
# 1. increment version, commit, and tag with bump2version
|
||
|
# 2. generate production outputs from within pcbnew using the "Fabrication Toolkit" action plugin (https://github.com/Bouni/kicad-jlcpcb-tools)
|
||
|
# 3. run this script to move, rename, and commit production outputs
|
||
|
|
||
|
set -e
|
||
|
|
||
|
mkdir -p releases
|
||
|
|
||
|
TAG=v$(bump2version --dry-run --list minor | grep current_version | sed -r s,"^.*=",,)
|
||
|
|
||
|
PROJ=mellifera
|
||
|
SRC="${PROJ}/production"
|
||
|
DEST="releases/${TAG}"
|
||
|
|
||
|
mkdir $DEST
|
||
|
mv $SRC/bom.csv $DEST/${PROJ}_bom_${TAG}.csv
|
||
|
mv $SRC/designators.csv $DEST/${PROJ}_designators_${TAG}.csv
|
||
|
mv $SRC/gerber.zip $DEST/${PROJ}_gerber_${TAG}.zip
|
||
|
mv $SRC/netlist.ipc $DEST/${PROJ}_netlist_${TAG}.ipc
|
||
|
mv $SRC/positions.csv $DEST/${PROJ}_positions_${TAG}.csv
|
||
|
rmdir $SRC
|
||
|
|
||
|
git add $DEST
|
||
|
git commit -o $DEST -m "Generate ${TAG} production outputs"
|