mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
use bun run for build
This commit is contained in:
@@ -13,7 +13,7 @@ steps:
|
||||
directory: web/
|
||||
commands:
|
||||
- bun install --frozen-lockfile
|
||||
- bun build
|
||||
- bun run build
|
||||
|
||||
vendor:
|
||||
image: *golang_image
|
||||
|
||||
@@ -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"'
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||

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