mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 11:46:43 +01:00
Merge pull request #10650 from bitsf/fix_prepare_version
fix(feat) fix prepare version in installer
This commit is contained in:
commit
4ac98687fa
16
Makefile
16
Makefile
@ -226,6 +226,10 @@ DOCKERCOMPOSECHARTMUSEUMTPLFILENAME=docker-compose.chartmuseum.tpl
|
||||
DOCKERCOMPOSECHARTMUSEUMFILENAME=docker-compose.chartmuseum.yml
|
||||
|
||||
SEDCMD=$(shell which sed)
|
||||
SEDCMDI=$(SEDCMD) -i
|
||||
ifeq ($(shell uname),Darwin)
|
||||
SEDCMDI=$(SEDCMD) -i ''
|
||||
endif
|
||||
|
||||
# package
|
||||
TARCMD=$(shell which tar)
|
||||
@ -334,7 +338,11 @@ compile_notary_migrate_patch:
|
||||
|
||||
compile: check_environment versions_prepare compile_core compile_jobservice compile_registryctl compile_notary_migrate_patch
|
||||
|
||||
prepare:
|
||||
update_prepare_version:
|
||||
@echo "substitute the prepare version tag in prepare file..."
|
||||
@$(SEDCMDI) -e 's/goharbor\/prepare:.*[[:space:]]\+/goharbor\/prepare:$(VERSIONTAG) /' $(MAKEPATH)/prepare ;
|
||||
|
||||
prepare: update_prepare_version
|
||||
@echo "preparing..."
|
||||
@$(MAKEPATH)/$(PREPARECMD) $(PREPARECMD_PARA)
|
||||
|
||||
@ -355,11 +363,11 @@ build_base_docker:
|
||||
|
||||
install: compile build prepare start
|
||||
|
||||
package_online:
|
||||
package_online: update_prepare_version
|
||||
@echo "packing online package ..."
|
||||
@cp -r make $(HARBORPKG)
|
||||
@if [ -n "$(REGISTRYSERVER)" ] ; then \
|
||||
$(SEDCMD) -i -e 's/image\: goharbor/image\: $(REGISTRYSERVER)\/$(REGISTRYPROJECTNAME)/' \
|
||||
$(SEDCMDI) -e 's/image\: goharbor/image\: $(REGISTRYSERVER)\/$(REGISTRYPROJECTNAME)/' \
|
||||
$(HARBORPKG)/docker-compose.yml ; \
|
||||
fi
|
||||
@cp LICENSE $(HARBORPKG)/LICENSE
|
||||
@ -368,7 +376,7 @@ package_online:
|
||||
@rm -rf $(HARBORPKG)
|
||||
@echo "Done."
|
||||
|
||||
package_offline: compile build
|
||||
package_offline: update_prepare_version compile build
|
||||
|
||||
@echo "packing offline package ..."
|
||||
@cp -r make $(HARBORPKG)
|
||||
|
@ -32,8 +32,6 @@ fi
|
||||
|
||||
data_path=$(grep '^[^#]*data_volume:' $input_dir/harbor.yml | awk '{print $NF}')
|
||||
|
||||
echo "VERSIONTAG:${VERSIONTAG:=dev}"
|
||||
|
||||
# If previous secretkeys exist, move it to new location
|
||||
previous_secretkey_path=/data/secretkey
|
||||
previous_defaultalias_path=/data/defaultalias
|
||||
@ -59,7 +57,7 @@ docker run --rm -v $input_dir:/input:z \
|
||||
-v $config_dir:/config:z \
|
||||
-v $secret_dir:/secret:z \
|
||||
-v /:/hostfs:z \
|
||||
goharbor/prepare:${VERSIONTAG} $@
|
||||
goharbor/prepare:dev $@
|
||||
|
||||
echo "Clean up the input dir"
|
||||
# Clean up input dir
|
||||
|
Loading…
Reference in New Issue
Block a user