wip
This commit is contained in:
@@ -6,7 +6,7 @@ COMMIT_BEFORE := $(if $(filter 0000000000000000000000000000000
|
||||
endif
|
||||
ifneq (,$(filter $(DRONE_BUILD_EVENT),tag))
|
||||
COMMIT_AFTER := $(DRONE_TAG)
|
||||
COMMIT_BEFORE := $(shell git describe --abbrev=0 --tags $(DRONE_TAG)^)
|
||||
COMMIT_BEFORE := $(shell git describe --abbrev=0 --tags $(DRONE_TAG)^ 2>/dev/null)
|
||||
endif
|
||||
APPS_IMPACTED := $(shell git diff --name-only $(COMMIT_BEFORE) $(COMMIT_AFTER) 2>/dev/null |awk -F '/' 'NF>1 && !seen[$$1]++ {print $$1}')
|
||||
# prevent drone to make down myos
|
||||
|
||||
@@ -3,6 +3,6 @@ APPS_NAME ?= $(foreach app,$(APPS),$(or $(shell awk -F '='
|
||||
CMDS += copy master-tag release release-check release-create release-finish subrepo-push update-subrepo
|
||||
CONTEXT += APPS APPS_NAME ENV RELEASE_INSTALL
|
||||
DIRS ?= $(MAKE_DIR) $(PARAMETERS) $(SHARED)
|
||||
RELEASE_UPGRADE ?= $(filter v%, $(shell git tag -l |sort -V |awk '/$(RELEASE_INSTALL)/,0'))
|
||||
RELEASE_UPGRADE ?= $(filter v%, $(shell git tag -l 2>/dev/null |sort -V |awk '/$(RELEASE_INSTALL)/,0'))
|
||||
RELEASE_VERSION ?= $(firstword $(subst -, ,$(VERSION)))
|
||||
SUBREPOS ?= $(filter subrepo/%, $(shell git remote))
|
||||
SUBREPOS ?= $(filter subrepo/%, $(shell git remote 2>/dev/null))
|
||||
|
||||
@@ -14,7 +14,7 @@ update-$(PARAMETERS): $(PARAMETERS)
|
||||
$(PARAMETERS): SSH_PUBLIC_HOST_KEYS := $(PARAMETERS_REMOTE_HOST) $(SSH_BASTION_HOSTNAME) $(SSH_REMOTE_HOSTS)
|
||||
$(PARAMETERS): MAKE_VARS += SSH_BASTION_HOSTNAME SSH_BASTION_USERNAME SSH_PRIVATE_IP_RANGE SSH_PUBLIC_HOST_KEYS
|
||||
$(PARAMETERS): myos-base
|
||||
$(call exec,[ -d $(PARAMETERS) ] && cd $(PARAMETERS) && git pull --quiet || git clone --quiet $(GIT_PARAMETERS_REPOSITORY))
|
||||
$(call exec,[ -d $(PARAMETERS) ] && cd $(PARAMETERS) && git pull --quiet || git clone --quiet $(APP_PARAMETERS_REPOSITORY))
|
||||
|
||||
## Update release version number in .env
|
||||
.PHONY: update-release
|
||||
@@ -44,4 +44,4 @@ update-upstream: myos-base .git/refs/remotes/upstream/master
|
||||
$(call exec,git fetch --tags upstream)
|
||||
|
||||
.git/refs/remotes/upstream/master: myos-base
|
||||
$(call exec,git remote add upstream $(GIT_UPSTREAM_REPOSITORY) 2>/dev/null ||:)
|
||||
$(call exec,git remote add upstream $(APP_UPSTREAM_REPOSITORY) 2>/dev/null ||:)
|
||||
|
||||
Reference in New Issue
Block a user