Skip to content

Commit

Permalink
Add logic for remote binaries (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrainDoctor authored Sep 11, 2022
1 parent 8e982f6 commit fa6fdea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ jobs:
hasbin="$(find $plugin -maxdepth 1 -type d -name 'bin' -printf '%P\n')"
# Check if plugin has a defaults folder, if so, add "default" contents to root dir
hasdefaults="$(find $plugin -maxdepth 1 -type d -name 'defaults' -printf '%P\n')"
hasremotebin="$(cat $plugin/package.json | jq -e -s -r ".[].remote_binary")"
# Add required plugin files (and directory) to zip file
echo "$plugin/dist $plugin/plugin.json $plugin/package.json"
Expand All @@ -178,6 +180,12 @@ jobs:
zip -r $zipname "$plugin/bin"
fi
if [ ! "$hasremotebin" == "null" ]; then
remotebin="$(cat $plugin/package.json | jq -s -r ".[].remote_binary")"
curl -L "$remotebin" -o "/tmp/$(basename $remotebin)"
zip -r $zipname "/tmp/$(basename $remotebin)"
fi
if [ ! -z "$haspython" ]; then
echo "$plugin/*.py"
find $plugin -maxdepth 1 -type f -name '*.py' -exec zip -r $zipname {} \;
Expand Down

0 comments on commit fa6fdea

Please sign in to comment.