Skip to content

Commit 1983e3e

Browse files
committed
tools: add release script
Signed-off-by: Rafael Silva <[email protected]>
1 parent 1ba6dab commit 1983e3e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

release.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
name="openinput-kicad-library"
4+
lib_files="./symbols ./footprints ./3dmodels ./resources ./metadata.json"
5+
6+
# TODO write metadatas dynamically,
7+
# (pack side and kicad repo side)
8+
# rewrite in python
9+
10+
# Pack
11+
zip -r ./${name}.zip ${lib_files}
12+
13+
# Compute checksum
14+
echo -n '"download_sha256": ' > ./${name}_info.txt
15+
sha256sum ./${name}.zip | sed -E 's/\s(.*)//;t;d' >> ./${name}_info.txt
16+
17+
# Compute download size
18+
echo -n '"download_size": ' >> ./${name}_info.txt
19+
du -csb ./${name}.zip | grep total | sed 's/ *\stotal* *\(.*\)/\1/' >> ./${name}_info.txt
20+
21+
# Compute install size
22+
echo -n '"install_size": ' >> ./${name}_info.txt
23+
du -csb ${lib_files} | grep total | sed 's/ *\stotal* *\(.*\)/\1/' >> ./${name}_info.txt

0 commit comments

Comments
 (0)