From 3f8cbb150ebf807e9533760ec5b10d35c059f936 Mon Sep 17 00:00:00 2001 From: Andre Weber Date: Mon, 29 Apr 2024 09:50:26 +0200 Subject: [PATCH] Add Section about 'velocitas init' with package parameter --- .../lifecycle_management/velocitas_cli.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/lifecycle_management/velocitas_cli.md b/content/en/docs/concepts/lifecycle_management/velocitas_cli.md index e31b341dd..dbfb150a4 100644 --- a/content/en/docs/concepts/lifecycle_management/velocitas_cli.md +++ b/content/en/docs/concepts/lifecycle_management/velocitas_cli.md @@ -43,7 +43,7 @@ Config 'src' for interface 'vehicle-signal-interface': URI or path to VSS json ( ### velocitas init -Download packages configured in your `.velocitas.json` to [VELOCITAS_HOME](https://github.com/eclipse-velocitas/cli/blob/main/README.md#changing-default-velocitas_home-directory) +#### Download packages configured in your `.velocitas.json` to [VELOCITAS_HOME](https://github.com/eclipse-velocitas/cli/blob/main/README.md#changing-default-velocitas_home-directory) ```bash vscode ➜ /workspaces/vehicle-app-python-template (main) $ velocitas init @@ -57,6 +57,19 @@ Running 'install-deps' ... ``` +#### Dynamically initialize packages NOT configured in `.velocitas.json` + +Packages which are not part of .velocitas.json can easily be initialized using the _package parameter_ `-p / --package` and the _specifier parameter_ `-s / --specifier`. The _specifier parameter_ can be either a git tag or a git hash. If the _specifier parameter_ is omitted the latest version of the specified package will be used automatically. After initialisation the package and it's resolved version will be written to `.velocitas.json`. If the package is already part of `.velocitas.json`, however the version is different the version will be automatically adapted to reflect the specified version. + +```bash +vscode ➜ /workspaces/vehicle-app-python-template (main) $ velocitas init -p devenv-runtimes -s v3.0.0 +Initializing Velocitas packages ... +... Package 'devenv-runtimes:v3.0.0' added to .velocitas.json +... Downloading package: 'devenv-runtimes:v3.0.0' +... > Running post init hook for ... +... +``` + ### velocitas sync If any package provides files they will be synchronized into your repository.