Skip to content

Commit

Permalink
feat(Snapcraft): move parts lifecycle into a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie-Pages committed Jan 19, 2025
1 parent e4362cb commit d8ae70b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions snapcraft/reference/parts-lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Parts lifecycle

Each part is composed of five steps, known as the "lifecycle":

| Step | Purpose | Directory | Command |
| ----------- | ----------- | ----------- | ----------- |
| 1. **Pull** | Download or retrieve the components' sources and external dependencies needed to build the part. | Components' sources and external dependencies are put in CRAFT_PART_**SRC**. | `snapcraft pull [<part-name>]` |
| 2. **Build** | Build the components from the previously pulled sources. | Build the sources in CRAFT_PART_**BUILD** and places the result in CRAFT_PART_**INSTALL** | `snapcraft build [<part-name>]` |
| 3. **Stage** | Copy the built components into the staging area. | The built components are put in CRAFT_**STAGE**. | `snapcraft stage [<part-name>]` |
| 4. **Prime** | Copy the staged components into the priming area. | The staged components are put in CRAFT_**PRIME**. | `snapcraft prime [<part-name>]` |
| 5. **Pack** | Take the contents of the prime directory and pack it into a snap. | The snap is put in CRAFT_PROJECT_**DIR**. | `snapcraft pack or snapcraft` |

0 comments on commit d8ae70b

Please sign in to comment.