From 977a2090fbd75d721721f43a24004736030ed785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Wed, 30 Oct 2024 19:17:04 +0100 Subject: [PATCH] :tada: add command to build docs bundle --- docs/scripts/{build.sh => build} | 0 manage.sh | 34 ++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) rename docs/scripts/{build.sh => build} (100%) diff --git a/docs/scripts/build.sh b/docs/scripts/build similarity index 100% rename from docs/scripts/build.sh rename to docs/scripts/build diff --git a/manage.sh b/manage.sh index 942aec241..09ce5ab42 100755 --- a/manage.sh +++ b/manage.sh @@ -177,13 +177,27 @@ function build-exporter-bundle { rm -rf $bundle_dir; mv ./exporter/target $bundle_dir; - echo $version > $bundle_dir/version.txt put-license-file $bundle_dir; - echo ">> bundle exporter end"; } +function build-docs-bundle { + echo ">> bundle docs start"; + + mkdir -p ./bundles + local version=$(print-current-version); + local bundle_dir="./bundles/docs"; + + build "docs"; + + rm -rf $bundle_dir; + mv ./docs/_dist $bundle_dir; + echo $version > $bundle_dir/version.txt; + put-license-file $bundle_dir; + echo ">> bundle docs end"; +} + function build-docker-images { rsync -avr --delete ./bundles/frontend/ ./docker/images/bundle-frontend/; rsync -avr --delete ./bundles/backend/ ./docker/images/bundle-backend/; @@ -204,12 +218,24 @@ function usage { echo "Options:" echo "- pull-devenv Pulls docker development oriented image" echo "- build-devenv Build docker development oriented image" + echo "- build-devenv-local Build a local docker development oriented image" echo "- create-devenv Create the development oriented docker compose service." echo "- start-devenv Start the development oriented docker compose service." echo "- stop-devenv Stops the development oriented docker compose service." echo "- drop-devenv Remove the development oriented docker compose containers, volumes and clean images." echo "- run-devenv Attaches to the running devenv container and starts development environment" + echo "- run-devenv-shell Attaches to the running devenv container and starts a bash shell." + echo "- log-devenv Show logs of the running devenv docker compose service." echo "" + echo "- build-bundle Build all bundles (frontend, backend and exporter)." + echo "- build-frontend-bundle Build frontend bundle" + echo "- build-backend-bundle Build backend bundle." + echo "- build-exporter-bundle Build exporter bundle." + echo "- build-docs-bundle Build docs bundle." + echo "" + echo "- build-docker-images Build all docker images (frontend, backend and exporter)." + echo "" + echo "- version Show penpot's version." } case $1 in @@ -276,6 +302,10 @@ case $1 in build-exporter-bundle; ;; + build-docs-bundle) + build-docs-bundle; + ;; + build-docker-images) build-docker-images ;;