@@ -113,3 +113,47 @@ To clean up all the resources created by the `e2e:setup-env` task, run:
113113``` bash
114114task e2e:cleanup
115115```
116+
117+ ---
118+
119+ ## Create a new extension
120+
121+ To create a new extension project, you can use the ` create-extension ` task:
122+
123+ ``` bash
124+ task create-extension NAME=< extension-name>
125+ ```
126+
127+ The command will create a new directory named ` <extension-name> ` using default configurations.
128+ For a more advanced and customized setup, you can use the dagger command directly:
129+
130+ ``` bash
131+ dagger call -sm ./dagger/maintenance/ create --help
132+
133+ Scaffolds a new Postgres extension directory structure
134+
135+ USAGE
136+ dagger call create [arguments] < function>
137+
138+ FUNCTIONS:
139+
140+ [...]
141+
142+ ARGUMENTS
143+ --name string The name of the extension [required]
144+ --distros strings The Debian distributions the extension is supported for (default [trixie,bookworm])
145+ --package-name string The Debian package name for the extension. If the package name contains
146+ the postgres version, it can be templated using the " %version%" placeholder.
147+ (default " postgresql-%version%-<name>" )
148+ --templates-dir Directory The source directory containing the extension template files
149+ --versions strings The Postgres major versions the extension is supported for (default [18])
150+ ```
151+
152+ This command creates a new folder with the following files:
153+
154+ - ` Dockerfile ` : the Dockerfile to build the extension container image.
155+ - ` metadata.hcl ` : the file providing specific metadata information used to build and test the extension.
156+ - ` README.md ` : a template README file to get started with documenting the extension usage.
157+
158+ Those files are scaffolded with a generic template that are meant to be customized according to the
159+ specific extension requirements.
0 commit comments