-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
43 lines (36 loc) · 851 Bytes
/
build.sh
File metadata and controls
43 lines (36 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
VERSION=1.0.0
set -e
# 构建 server
echo "=== Building backend server ==="
echo "Building with Maven..."
mvn clean package -DskipTests
cd portal-bootstrap
echo "Building backend Docker image..."
docker buildx build \
--platform linux/amd64 \
-t himarket-server:$VERSION \
--load .
echo "Backend server build completed"
cd ..
# 构建 frontend
cd portal-web/api-portal-frontend
echo "=== Building frontend ==="
rm -rf ./dist
npm install --force
npm run build
docker buildx build \
-t himarket-frontend:$VERSION \
--platform linux/amd64 \
--load .
# 构建 admin
cd ../api-portal-admin
echo "=== Building admin ==="
rm -rf ./dist
npm install --force
npm run build
docker buildx build \
-t himarket-admin:$VERSION \
--platform linux/amd64 \
--load .
echo "All images have been built successfully!"