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.
This commit is contained in:
Perry Manuk
2020-08-19 12:10:32 +02:00
parent c5ab3d0d76
commit 24a1298983
+2 -3
View File
@@ -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