From c91db77d4a0451d29278fd657e29d26c8c6ded91 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Fri, 20 Jan 2023 15:57:15 +0100 Subject: [PATCH] Simplify logic in create-app.adoc and allow to define stream The idea is to define the stream value for older versions so that people can create apps for these versions by running the command. --- docs/src/main/asciidoc/_attributes.adoc | 2 ++ .../_includes/devtools/create-app.adoc | 22 ++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/src/main/asciidoc/_attributes.adoc b/docs/src/main/asciidoc/_attributes.adoc index 98a56d814a4d9..af5961b6be373 100644 --- a/docs/src/main/asciidoc/_attributes.adoc +++ b/docs/src/main/asciidoc/_attributes.adoc @@ -51,4 +51,6 @@ :vault-datasource-guide: https://quarkiverse.github.io/quarkiverse-docs/quarkus-vault/dev/vault-datasource.html :micrometer-registry-guide: https://quarkiverse.github.io/quarkiverse-docs/quarkus-micrometer-registry/dev/index.html // . +:create-app-group-id: org.acme +// . include::_attributes-local.adoc[] \ No newline at end of file diff --git a/docs/src/main/asciidoc/_includes/devtools/create-app.adoc b/docs/src/main/asciidoc/_includes/devtools/create-app.adoc index 2c76ce65c9a64..99f71e2897de6 100644 --- a/docs/src/main/asciidoc/_includes/devtools/create-app.adoc +++ b/docs/src/main/asciidoc/_includes/devtools/create-app.adoc @@ -3,11 +3,10 @@ **** [source,bash,subs=attributes+] ---- -ifdef::create-app-group-id[] -ifdef::create-app-extensions[] +ifdef::create-app-extensions,create-app-stream[] quarkus create app {create-app-group-id}:{create-app-artifact-id} \ endif::[] -ifndef::create-app-extensions[] +ifndef::create-app-extensions,create-app-stream[] ifndef::create-app-code[] quarkus create app {create-app-group-id}:{create-app-artifact-id} \ endif::[] @@ -15,17 +14,16 @@ ifdef::create-app-code[] quarkus create app {create-app-group-id}:{create-app-artifact-id} endif::[] endif::[] -endif::[] -ifndef::create-app-group-id[] +ifdef::create-app-stream[] ifdef::create-app-extensions[] -quarkus create app org.acme:{create-app-artifact-id} \ + --stream={create-app-stream} \ endif::[] ifndef::create-app-extensions[] ifndef::create-app-code[] -quarkus create app org.acme:{create-app-artifact-id} \ + --stream={create-app-stream} \ endif::[] ifdef::create-app-code[] -quarkus create app org.acme:{create-app-artifact-id} + --stream={create-app-stream} endif::[] endif::[] endif::[] @@ -63,12 +61,10 @@ _For more information about how to install the Quarkus CLI and use it, please re [source,bash,subs=attributes+] ---- mvn io.quarkus.platform:quarkus-maven-plugin:{quarkus-version}:create \ -ifdef::create-app-group-id[] - -DprojectGroupId={create-app-group-id} \ -endif::[] -ifndef::create-app-group-id[] - -DprojectGroupId=org.acme \ +ifdef::create-app-stream[] + -DplatformVersion={create-app-stream} \ endif::[] + -DprojectGroupId={create-app-group-id} \ ifdef::create-app-extensions[] -DprojectArtifactId={create-app-artifact-id} \ endif::[]