Skip to content

Commit 5001e46

Browse files
committed
chore: build new dashboard ui into apisix rpm&deb package
Signed-off-by: Nic <[email protected]>
1 parent 2c3e7df commit 5001e46

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.idea
1+
.idea
2+
apisix
3+
apisix-runtime

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ endef
194194
.PHONY: build-apisix-rpm
195195
build-apisix-rpm:
196196
ifeq ($(local_code_path), 0)
197-
git clone -b $(checkout) $(apisix_repo) ./apisix
197+
git clone -b $(checkout) $(apisix_repo) --depth 1 ./apisix
198+
./build-apisix-ui.sh ./apisix
198199
$(call build,apisix,apisix,rpm,"./apisix")
199200
rm -fr ./apisix
200201
else
@@ -204,7 +205,8 @@ endif
204205
.PHONY: build-apisix-deb
205206
build-apisix-deb:
206207
ifeq ($(local_code_path), 0)
207-
git clone -b $(checkout) $(apisix_repo) ./apisix
208+
git clone -b $(checkout) $(apisix_repo) --depth 1 ./apisix
209+
./build-apisix-ui.sh ./apisix
208210
$(call build,apisix,apisix,deb,"./apisix")
209211
rm -fr ./apisix
210212
else

build-apisix-ui.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
set -x
4+
5+
cd $1
6+
source .requirements
7+
git clone --revision=${APISIX_DASHBOARD_COMMIT} --depth 1 https://github.com/apache/apisix-dashboard.git
8+
pushd apisix-dashboard
9+
# compile
10+
pnpm install --frozen-lockfile
11+
pnpm run build
12+
popd
13+
# copy the dist files to the ui directory
14+
mkdir ui
15+
cp -r apisix-dashboard/dist/* ui/
16+
rm -rf apisix-dashboard

0 commit comments

Comments
 (0)