diff --git a/docs/articles/en/built-in-modules.md b/docs/articles/en/built-in-modules.md index ef43b9e..44f7028 100644 --- a/docs/articles/en/built-in-modules.md +++ b/docs/articles/en/built-in-modules.md @@ -10,7 +10,7 @@ Tags: --- > **Note** -> At the time of writing, Vib is in active development and the list of built-in modules may grow over time. This article covers the modules available in Vib v0.5.0. +> At the time of writing, Vib is in active development and the list of built-in modules may grow over time. This article covers the modules available in Vib v0.8.1. Vib supports a variety of built-in modules that you can use to build your recipes. These modules are designed to automate common tasks, such as installing packages, building software, and running custom scripts. @@ -28,6 +28,7 @@ To keep this article concise, we'll cover only the fields that are specific to e - [Make](#make) - [Meson](#meson) - [Shell](#shell) +- [Flatpak](#flatpak) ## Package manager @@ -227,3 +228,33 @@ The following specific fields are available: - "echo Hello, World!" - "apt update && apt install -y curl" ``` + +## Flatpak + +The Flatpak module installs Flatpak packages using the `flatpak` command. + +The following specific fields are available: + +- `system`: If configured, the module will install the applications system-wide. +- `user`: If configured, the module will install the applications user-wide. + +### Example + +```yaml +- name: install-flatpak-app + type: flatpak + system: + repourl: "https://flathub.org/repo/flathub.flatpakrepo" + reponame: "flathub" + install: + - "org.gnome.Epiphany" + remove: + - "org.gnome.Epiphany" + user: + repourl: "https://flathub.org/repo/flathub.flatpakrepo" + reponame: "flathub" + install: + - "org.gnome.Epiphany" + remove: + - "org.gnome.Epiphany" +``` \ No newline at end of file diff --git a/docs/articles/en/making-plugin.md b/docs/articles/en/making-plugin.md new file mode 100644 index 0000000..6aaa617 --- /dev/null +++ b/docs/articles/en/making-plugin.md @@ -0,0 +1,15 @@ +--- +Title: Making a Plugin +Description: How to build a custom plugin for Vib. +PublicationDate: 2024-02-14 +Listed: true +Authors: + - mirkobrombin +Tags: + - github + - build +--- + +This documentation is still being written. Please check back later. +If you are a developer, please have a look at the reference documentation for [Vib](https://dev-vib.vanillaos.org/). +You may also want to check out the [vib-plugin template](https://github.com/Vanilla-OS/vib-plugin). diff --git a/docs/articles/en/recipe-structure.md b/docs/articles/en/recipe-structure.md index b948e8e..f54d698 100644 --- a/docs/articles/en/recipe-structure.md +++ b/docs/articles/en/recipe-structure.md @@ -197,6 +197,26 @@ Refer to the [Use Modules](/vib/en/use-modules) article for more information on You can also write your custom modules by making a Vib plugin, see the [Making a Plugin](/vib/en/making-plugin) article for more information. +#### Setting up the working directory + +Each module can have a `workdir` field that changes the directory before executing the rest of the module operations. The following is an example of how to use the `workdir` field: + +```yml +- name: example-module + type: shell + workdir: /app + commands: + - touch file.txt + +- name: example-module-2 + type: shell + workdir: /app + commands: + - ls -la +``` + +In this example, the `example-module` module creates a file named `file.txt` in the `/app` directory, and the `example-module-2` module lists the contents of the `/app` directory. + ### Copying files between stages You can copy files between stages using the `copy` field. This consists of a list of files or directories to copy from another stage. Each item in the list is a YAML snippet that defines the source and destination of the copy operation. The common structure is: