Merge pull request #84 from spotify/bil/add-makefile

Setup Makefile for easier build commands
This commit is contained in:
Bilawal Hameed
2020-02-07 12:01:00 +01:00
committed by GitHub
2 changed files with 28 additions and 4 deletions
+24
View File
@@ -0,0 +1,24 @@
###
# All-in-one build command.
###
build: build-yarn-dependencies build-protocol-definitions
###
# Download dependencies from the Frontend using Yarn.
###
build-yarn-dependencies:
yarn --cwd ${PWD}/frontend install
###
# Protobuf Definitions.
# This will generate Protobuf definitions from ./proto to both Go and JS/TypeScript.
###
build-protocol-definitions:
prototool generate ${PWD}/proto
###
# Create new frontend plugin.
# This will run Cookiecutter to generate a new Backstage frontend plugin.
###
scaffold-new-frontend-plugin:
${PWD}/tools/cookiecutter/init.sh frontend/packages/plugins/_template --output-dir frontend/packages/plugins
+4 -4
View File
@@ -10,10 +10,10 @@ Backstage is an open platform for building developer portals.
### Protobuf Definitions
To generate the Protobuf definitions in Go and TypeScript, run the following command from the root with [Prototool](https://github.com/uber/prototool):
To generate the Protobuf definitions in Go and TypeScript, run the following command from the root to run [Prototool](https://github.com/uber/prototool):
```bash
$ prototool generate ./proto
$ make build-protocol-definitions
```
See [proto/README.md](proto/README.md) for more information.
@@ -25,13 +25,13 @@ See [proto/README.md](proto/README.md) for more information.
Run the following:
```bash
$ ./tools/cookiecutter/init.sh frontend/packages/plugins/_template --output-dir frontend/packages/plugins
$ make scaffold-new-frontend-plugin
```
This will generate a plugin in the `frontend/packages/plugins` folder. It is important to note you will still need to include the plugin in your `frontend/packages/app` in the `package.json`. You will then be able to import it as follows:
```bash
$ ./tools/cookiecutter/init.sh frontend/packages/plugins/_template --output-dir frontend/packages/plugins
$ make scaffold-new-frontend-plugin
plugin_name [example-plugin]: github-api
$ vim frontend/packages/app/package.json