Skip to content

Commit

Permalink
Updates for release via Plugin and Content Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mitxela committed Jan 29, 2022
1 parent 067113f commit a4be307
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ venv.bak/

# mypy
.mypy_cache/


kicad-round-tracks-*.zip
metadata.json
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions metadata.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://go.kicad.org/pcm/schemas/v1",
"name": "Round Tracks",
"description": "A subdivision- and/or native arc-based track rounding plugin.",
"description_full": "Algorithmically smooth tracks in a predictable manner. Useful for flex PCBs, or just because it looks cool.",
"identifier": "com.github.mitxela.kicad-round-tracks",
"type": "plugin",
"author": {
"name": "mitxela",
"contact": {
"web": "https://mitxela.com"
}
},
"license": "Apache-2.0",
"resources": {
"homepage": "https://github.com/mitxela/kicad-round-tracks"
},
"versions": [
{
"version": "VERSION",
"status": "stable",
"kicad_version": "6.0",
"download_sha256": "SHA256",
"download_size": DOWNLOAD_SIZE,
"download_url": "https://github.com/mitxela/kicad-round-tracks/releases/download/VERSION/kicad-round-tracks-VERSION.zip",
"install_size": INSTALL_SIZE,
"platforms": [
"linux",
"macos",
"windows"
]

}
]
}
35 changes: 35 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash -e

version=$(git describe --tags --dirty)
name=$(echo kicad-round-tracks-$version.zip)

echo "Building release $version"
cp metadata.json.template metadata.json
sed -i -e "s/VERSION/$version/g" metadata.json
sed -i '/download_/d' metadata.json
sed -i '/install_size/d' metadata.json

mkdir resources
cp icon.png resources/

mkdir plugins
cp *.py plugins/
cp round_tracks.png plugins/

zip -r $name plugins resources metadata.json

rm -rf plugins
rm -rf resources

sha=$(sha256sum $name | cut -d' ' -f1)
size=$(du -b $name | cut -f1)
installSize=$(unzip -l $name | tail -1 | xargs | cut -d' ' -f1)

cp metadata.json.template metadata.json
sed -i -e "s/VERSION/$version/g" metadata.json
sed -i -e "s/SHA256/$sha/g" metadata.json
sed -i -e "s/DOWNLOAD_SIZE/$size/g" metadata.json
sed -i -e "s/INSTALL_SIZE/$installSize/g" metadata.json

ls -lh $name metadata.json

0 comments on commit a4be307

Please sign in to comment.