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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user