From 24a12989831c5ed7522ceaf74450cac0abd06f29 Mon Sep 17 00:00:00 2001 From: Perry Manuk Date: Wed, 19 Aug 2020 12:10:32 +0200 Subject: [PATCH] Techdocs-cli Build Fix We're using cloud build in gcp to build/package our backstage deployment and when you upload your artifacts it will remove all of the .git folder to mimimize the upload causing the techdocs-cli to fail as it relies on using `git rev-parse` to discover the full path. I changed this to be statically linked so the reliance on git is no longer there and so that as long as the structure of your repo doesn't change it should build no matter where the root folder is placed. --- packages/techdocs-cli/bin/build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/techdocs-cli/bin/build.sh b/packages/techdocs-cli/bin/build.sh index 225cc334aa..0a3dfeb96d 100755 --- a/packages/techdocs-cli/bin/build.sh +++ b/packages/techdocs-cli/bin/build.sh @@ -16,9 +16,8 @@ set -e -ROOT_DIR=$(git rev-parse --show-toplevel) -TECHDOCS_PREVIEW_SOURCE=$ROOT_DIR/plugins/techdocs/dist -TECHDOCS_PREVIEW_DEST=$ROOT_DIR/packages/techdocs-cli/dist/techdocs-preview-bundle +TECHDOCS_PREVIEW_SOURCE=../../plugins/techdocs/dist +TECHDOCS_PREVIEW_DEST=../../packages/techdocs-cli/dist/techdocs-preview-bundle # Build the CLI yarn run backstage-cli -- build --outputs cjs