File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -44,25 +44,32 @@ all: clean build
44
44
# ##############################################################################
45
45
# BUILD
46
46
47
- # Build the commands in the cmd directory
47
+ # Compile NPM and build the commands in the cmd directory
48
48
.PHONY : build
49
- build : tidy $(NPM_DIR ) $(PLUGIN_DIR ) $(CMD_DIR )
49
+ build : $(NPM_DIR ) build-docker
50
+
51
+ # Build the commands in the cmd directory
52
+ .PHONY : build-docker
53
+ build-docker : tidy $(PLUGIN_DIR ) $(CMD_DIR )
50
54
55
+ # Build the commands
51
56
$(CMD_DIR ) : go-dep mkdir
52
57
@echo Build command $(notdir $@ ) GOOS=${OS} GOARCH=${ARCH}
53
58
@GOOS=${OS} GOARCH=${ARCH} ${GO} build ${BUILD_FLAGS} -o ${BUILD_DIR} /$(notdir $@ ) ./$@
54
59
60
+ # Build the plugins
55
61
$(PLUGIN_DIR ) : go-dep mkdir
56
62
@echo Build plugin $(notdir $@ ) GOOS=${OS} GOARCH=${ARCH}
57
63
@GOOS=${OS} GOARCH=${ARCH} ${GO} build -buildmode=plugin ${BUILD_FLAGS} -o ${BUILD_DIR} /$(notdir $@ ) .plugin ./$@
58
64
65
+ # Build the NPM packages
59
66
$(NPM_DIR ) : npm-dep
60
67
@echo Build npm $(notdir $@ )
61
68
@cd $@ && npm install && npm run prod
62
69
63
70
# Build the docker image
64
71
.PHONY : docker
65
- docker : docker-dep
72
+ docker : docker-dep ${NPM_DIR}
66
73
@echo build docker image ${DOCKER_TAG} OS=${OS} ARCH=${ARCH} SOURCE=${DOCKER_SOURCE} VERSION=${VERSION}
67
74
@${DOCKER} build \
68
75
--tag ${DOCKER_TAG} \
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ COPY . .
11
11
# Build the server
12
12
RUN \
13
13
apt update -y && apt upgrade -y && \
14
- OS=${OS} ARCH=${ARCH} make build
14
+ OS=${OS} ARCH=${ARCH} make build-docker
15
15
16
16
# Copy binaries to /usr/local/bin
17
17
FROM --platform=${OS}/${ARCH} debian:bookworm-slim
You can’t perform that action at this time.
0 commit comments