diff --git a/packages/techdocs-cli/bin/build b/packages/techdocs-cli/bin/build.sh similarity index 92% rename from packages/techdocs-cli/bin/build rename to packages/techdocs-cli/bin/build.sh index a86954ace9..225cc334aa 100755 --- a/packages/techdocs-cli/bin/build +++ b/packages/techdocs-cli/bin/build.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # Copyright 2020 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,7 +21,7 @@ TECHDOCS_PREVIEW_SOURCE=$ROOT_DIR/plugins/techdocs/dist TECHDOCS_PREVIEW_DEST=$ROOT_DIR/packages/techdocs-cli/dist/techdocs-preview-bundle # Build the CLI -backstage-cli build --outputs cjs +yarn run backstage-cli -- build --outputs cjs # Create export of the TechDocs plugin APP_CONFIG_techdocs_storageUrl='"http://localhost:3000/api"' yarn workspace @backstage/plugin-techdocs export @@ -27,9 +29,6 @@ APP_CONFIG_techdocs_storageUrl='"http://localhost:3000/api"' yarn workspace @bac # Copy over export to techdocs-cli dist/ folder cp -r $TECHDOCS_PREVIEW_SOURCE $TECHDOCS_PREVIEW_DEST -# Clean output -yarn workspace @backstage/plugin-techdocs clean - # Write to console echo "[techdocs-cli]: Built the dist/ folder" echo "[techdocs-cli]: Imported @backstage/plugin-techdocs dist/ folder into techdocs-preview-bundle/" diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 2e06c4a71e..e02474e195 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -18,7 +18,7 @@ "license": "Apache-2.0", "main": "dist/index.cjs.js", "scripts": { - "build": "./bin/build", + "build": "./bin/build.sh", "lint": "backstage-cli lint", "test": "backstage-cli test --passWithNoTests", "clean": "backstage-cli clean",