createcandle / Candle-manager-addon

An add-on for the Candle Controller / WebThings Gateway. It allows you to upload code to Arduino's with the click of a button.
MIT License
5 stars 5 forks source link

Prep package for addon-builder. #15

Closed mrstegeman closed 4 years ago

mrstegeman commented 4 years ago

References #14

createcandle commented 4 years ago

Is toggling _DEBUG going to be something the gateway manages? What does it do, or is it supposed to do? Is this supposed to be connected internally to the addon's debug functionality?

Currently the addon's debug functionality is exposed as an addon setting. My hope is that in the future it will become possible to manage permissions to acess these settings. Currenty users have unlimited access to debug information (or shell commands..), so any features that limit data visiblity between users can always still be circumvented to those determined to spy on their family members.

createcandle commented 4 years ago

The changes to package.sh seem to be deleting the contents of the arduino-cli folder. The generated zip file also doesn't have any arduino cli binaries in it. Am I missing something?

// Update: I've fixed this issue. But the script might not be useful for your automation anymore now? In the future, will the add-on builder just take the Github code and do everything from there? So then I just have to give a signal that a new version is ready? If so, will it still be easy/possible to test locally? Is there a blogpost about all these changes I can read somewhere?

mrstegeman commented 4 years ago

Is toggling _DEBUG going to be something the gateway manages? What does it do, or is it supposed to do? Is this supposed to be connected internally to the addon's debug functionality?

You already had it set to False, so this isn't changing anything. Toggling that adds a lot of extra debug messages inside the gateway_addon library.

The changes to package.sh seem to be deleting the contents of the arduino-cli folder. The generated zip file also doesn't have any arduino cli binaries in it. Am I missing something?

The point is to only include the arduino-cli binary for the package being built. The addon-builder sets up the ADDON_ARCH environment variable, which will cause all but that specific binary to be removed.

In the future, will the add-on builder just take the Github code and do everything from there? So then I just have to give a signal that a new version is ready? If so, will it still be easy/possible to test locally?

That's exactly what it does. We've been using it for years.