From 3eaee039064c8da649de912412773e6bcde3c50b Mon Sep 17 00:00:00 2001 From: yhua123 Date: Sat, 29 Oct 2016 22:26:21 +0800 Subject: [PATCH] Update Makefile fix #975 and #979 --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index d6aef9002..9afdfd20d 100644 --- a/Makefile +++ b/Makefile @@ -170,7 +170,9 @@ REGISTRYUSER=user REGISTRYPASSWORD=default version: - @$(SEDCMD) -i 's/version=\"{{.Version}}\"/version=\"$(VERSIONTAG)\"/' -i $(VERSIONFILEPATH)/$(VERSIONFILENAME) + if [ "$(DEVFLAG)" = "false" ] ; then \ + $(SEDCMD) -i 's/version=\"{{.Version}}\"/version=\"$(VERSIONTAG)\"/' -i $(VERSIONFILEPATH)/$(VERSIONFILENAME) ; \ + fi check_environment: @$(MAKEPATH)/$(CHECKENVCMD) @@ -212,11 +214,7 @@ build_common: version @echo "buildging db container for photon..." cd $(DOCKERFILEPATH_DB) && $(DOCKERBUILD) -f $(DOCKERFILENAME_DB) -t $(DOCKERIMAGENAME_DB):$(VERSIONTAG) . @echo "Done." - - @echo "pulling nginx and registry..." - $(DOCKERPULL) registry:2.5.0 - $(DOCKERPULL) nginx:1.9 - + build_photon: build_common make -f $(MAKEFILEPATH_PHOTON)/Makefile build -e DEVFLAG=$(DEVFLAG) @@ -262,6 +260,11 @@ package_offline: compile build modify_composefile @cp LICENSE $(HARBORPKG)/LICENSE @cp NOTICE $(HARBORPKG)/NOTICE + + @echo "pulling nginx and registry..." + $(DOCKERPULL) registry:2.5.0 + $(DOCKERPULL) nginx:1.9 + @echo "saving harbor docker image" $(DOCKERSAVE) -o $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tgz \ $(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ @@ -356,4 +359,4 @@ clean: @echo " make cleanversiontag: cleanpackageremove specific version tag" @echo " make cleanpackage: remove online and offline install package" -all: install \ No newline at end of file +all: install