use bun run for build

This commit is contained in:
Anbraten
2024-02-25 11:23:22 +01:00
parent a0a88e84a4
commit 1f7c9961a8
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ steps:
directory: web/
commands:
- bun install --frozen-lockfile
- bun build
- bun run build
vendor:
image: *golang_image
+1 -1
View File
@@ -72,7 +72,7 @@ steps:
directory: web/
commands:
- bun install --frozen-lockfile
- bun build
- bun run build
when:
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
+1 -1
View File
@@ -52,7 +52,7 @@ steps:
directory: docs/
commands:
- bun install --frozen-lockfile
- bun build
- bun run build
when:
- path: *when_path
event: [tag, pull_request, push]
+1 -1
View File
@@ -183,7 +183,7 @@ test: test-agent test-server test-server-datastore test-cli test-lib ## Run all
##@ Build
build-ui: ## Build UI
(cd web/; bun install --frozen-lockfile; bun build)
(cd web/; bun install --frozen-lockfile; bun run build)
build-server: build-ui generate-swagger ## Build server
CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-server${BIN_SUFFIX} go.woodpecker-ci.org/woodpecker/v2/cmd/server
+1 -1
View File
@@ -19,7 +19,7 @@ This command starts a local development server and opens up a browser window. Mo
## Build
```bash
bun build
bun run build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
+1 -1
View File
@@ -6,7 +6,7 @@ To develop the UI you need to install [Node.js and bun](./01-getting-started.md#
The UI code is placed in `web/`. Change to that folder in your terminal with `cd web/` and install all dependencies by running `bun install`. For production builds the generated UI code is integrated into the Woodpecker server by using [go-embed](https://pkg.go.dev/embed).
Testing UI changes would require us to rebuild the UI after each adjustment to the code by running `bun build` and restarting the Woodpecker server. To avoid this you can make use of the dev-proxy integrated into the Woodpecker server. This integrated dev-proxy will forward all none api request to a separate http-server which will only serve the UI files.
Testing UI changes would require us to rebuild the UI after each adjustment to the code by running `bun run build` and restarting the Woodpecker server. To avoid this you can make use of the dev-proxy integrated into the Woodpecker server. This integrated dev-proxy will forward all none api request to a separate http-server which will only serve the UI files.
![UI Proxy architecture](./ui-proxy.svg)
+1 -1
View File
@@ -16,5 +16,5 @@ bun build:woodpecker-plugins
bun start
# or build the docs to deploy it to some static page hosting
bun build
bun run build
```
+1 -1
View File
@@ -5,7 +5,7 @@
"scripts": {
"start": "cd ../ && make docs && cd docs && docusaurus start",
"build": "bun build:woodpecker-plugins && docusaurus build",
"build:woodpecker-plugins": "cd plugins/woodpecker-plugins && bun i && bun build",
"build:woodpecker-plugins": "cd plugins/woodpecker-plugins && bun i && bun run build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",