File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,18 @@ build-local: clean compile test
26
26
build : build-container-image delete-container test-container delete-container
27
27
28
28
build-container-image :
29
+ @echo " === $( PROJECT_NAME) === [ $@ ]: Building the container image"
29
30
@docker build --no-cache -t $(CONTAINER_IMAGE ) -f Dockerfile.test .
30
31
31
32
test-container :
33
+ @echo " === $( PROJECT_NAME) === [ $@ ]: Testing the integration"
32
34
@echo " make test" | docker run --name $(CONTAINER ) -i $(CONTAINER_IMAGE )
33
35
@docker cp $(CONTAINER ) :$(CONTAINER_PATH ) /coverage.xml .
34
36
35
37
compile-container : bin
36
- @echo " make compile" | docker run --name $(CONTAINER ) -i $(CONTAINER_IMAGE )
37
- @docker cp $(CONTAINER ) :$(CONTAINER_PATH ) /bin/$(BINARY_NAME ) $(BINS_DIR )
38
+ @echo " === $( PROJECT_NAME) === [ $@ ]: Creating the binaries"
39
+ @echo " make create-bins" | docker run --name $(CONTAINER ) -i -e VERSION $(CONTAINER_IMAGE )
40
+ @docker cp $(CONTAINER ) :$(CONTAINER_PATH ) /$(TARGET ) /bin/linux_amd64/$(BINARY_NAME ) $(BINS_DIR )
38
41
39
42
delete-container :
40
43
-docker rm -f $(CONTAINER ) 2> /dev/null
Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ FPM_DEB_OPTIONS = -t deb -p $(PACKAGES_DIR)/deb/
20
20
FPM_RPM_OPTIONS = -t rpm -p $(PACKAGES_DIR ) /rpm/ --epoch 0 --rpm-summary $(SUMMARY )
21
21
22
22
23
- package-local : clean create-bins-local prep-pkg-env $(PACKAGE_TYPES )
24
- package : clean create-bins prep-pkg-env $(PACKAGE_TYPES )
23
+ package-local : clean create-bins prep-pkg-env $(PACKAGE_TYPES )
24
+ package : clean create-bins-container prep-pkg-env $(PACKAGE_TYPES )
25
25
26
- create-bins : build-container-image delete-container compile-container delete-container
26
+ create-bins-container : build-container-image delete-container compile-container delete-container
27
27
28
- create-bins-local : deps
28
+ create-bins : deps
29
29
echo " === Main === [ create-bins ]: creating binary ..."
30
30
GOOS=linux go build -v -ldflags ' -X main.buildVersion=$(VERSION)' -o $(BINS_DIR ) /$(BINARY_NAME ) $(GO_FILES ) || exit 1
31
31
@echo " "
You can’t perform that action at this time.
0 commit comments