jovotech / jovo-cli

🛠 Command Line Interface for the Jovo Framework: Makes voice experience deployment a breeze, including features like local development and staging.
https://www.jovo.tech/marketplace/jovo-cli
Apache License 2.0
57 stars 31 forks source link

Calling "jovo build --clean" should NOT delete tasks folder #158

Open rmtuckerphx opened 3 years ago

rmtuckerphx commented 3 years ago

I'm submitting a...

Expected Behavior

Creating Custom Tasks for Alexa requires a tasks folder at platforms\alexaSkill\skill-package\tasks that contains task definition files. Calling --clean should not remove that folder or should make a backup copy first in a .clean folder.

Current Behavior

Calling $ jovo build --clean deletes the entire folder and the tasks contains task definition files that don't exist anyplace else so they can be lost.

Error log

None

Your Environment

jankoenig commented 3 years ago

Hi @rmtuckerphx,

Thank you for the suggestion. Although I understand where you're coming from, I think introducing a feature like this would be inconsistent behavior as the --clean flag should always delete the complete folder and create it with completely fresh content.

As a workaround, would it make sense to store your custom tasks in a separate folder outside the platforms folder and copy them into the folder (e.g. with a script) after running jovo build?

rmtuckerphx commented 3 years ago

The more I think about it, I like the idea of creating a backup folder and every time --clean is run a new folder based on datetime is created and the old folder is copied into it. Then the delete of the folder happens.

rubenaeg commented 3 years ago

Hey @rmtuckerphx , what's your thinking behind this? Would you want to exit the task midthrough, before it deleting the old folder?

rmtuckerphx commented 3 years ago

I just know that Amazon is putting more things in the platforms\alexaSkill\skill-package folder. So, maybe the skill.json file should be the only one deleted from there.

rubenaeg commented 3 years ago

Hm, this would be very inconsistent behaviour in my opinion, a better approach would be to support task generation.