UNPKG

2.48 kBMarkdownView Raw
1# Upgrade Guide For ask-cli v2
2
3> **Use this guide to upgrade CLI 1.x projects for deployment with the CLI v2**
4
5Skills created with CLI 1.x will need to update their project structure in order to deploy with CLI v2. To help projects upgrade to the new format, we have provided an `ask util upgrade-project` command that will attempt to perform the necessary changes.
6
7## Upgrade steps
8
91. Using ask-cli 1.x, deploy your skill:
10 `$ ask deploy`
112. Install ask-cli:
12 `$ npm install -g ask-cli`
133. Upgrade your skill project with ask-cli. From your project's root, run:
14 `$ ask util upgrade-project`
15 * The command will make the following changes to the project structure:
16
17 | | v1 project | v2 project |
18 |----------------------|-------------------|--------------------------------------------|
19 | project config | .ask/config | ask-resources.json |
20 | Alexa skill package | skill.json | skill-package/skill.json |
21 | | models/xx-YY.json | skill-package/interactionModels/xx-YY.json |
22 | | isps/ | skill-package/isps/ |
23 | | ...... | ...... |
24 | skill code | lambda/{codePath} | code/{codePath} |
25 | skill backend | N/A | infrastructures/ |
26 * The command will also create a hidden folder named ./legacy that contains a copy of your v1 skill project before the upgrade. If the upgrade is unsuccessful, use the contents of this folder to restore your skill project to its state before the upgrade.
27
284. Confirm successful upgrade with a v2 deploy after the upgrade:
29 `$ ask deploy`
30
31**NOTE:**
32* No changes will be made to existing AWS resources. We will utilize existing Lambda ARN(s) from the Lambda resources list in v1.
33* The upgrade-project command assumes v1 project structure, and focusing on managing existing resources in Alexa or AWS. Should this fail, we will present developers with error, link to GitHub issues to ask for support.
34* The ./hooks folder is no longer needed, as ask-cli v2 can infer code build flow.
35
36If you encounter any problems during this upgrade process, please create a [issues](https://github.com/alexa/ask-cli/issues) to us.