Added capability to make dev-tree without pushing
No push is the default
This commit is contained in:
parent
9651b9a1f9
commit
ba2bf40ede
|
@ -94,6 +94,13 @@ export GIT_DESCRIBE
|
|||
export GOTAGS
|
||||
export GOLDFLAGS
|
||||
|
||||
DEV_PUSH?=0
|
||||
ifeq ($(DEV_PUSH),1)
|
||||
DEV_PUSH_ARG=
|
||||
else
|
||||
DEV_PUSH_ARG=--no-push
|
||||
endif
|
||||
|
||||
# all builds binaries for all targets
|
||||
all: bin
|
||||
|
||||
|
@ -129,7 +136,7 @@ publish:
|
|||
@$(SHELL) $(CURDIR)/build-support/scripts/publish.sh $(PUB_GIT_ARG) $(PUB_WEBSITE_ARG)
|
||||
|
||||
dev-tree:
|
||||
@$(SHELL) $(CURDIR)/build-support/scripts/dev.sh
|
||||
@$(SHELL) $(CURDIR)/build-support/scripts/dev.sh $(DEV_PUSH_ARG)
|
||||
|
||||
cov:
|
||||
gocov test $(GOFILES) | gocov-html > /tmp/coverage.html
|
||||
|
|
|
@ -43,6 +43,7 @@ function main {
|
|||
declare build_os=""
|
||||
declare build_arch=""
|
||||
declare -i do_git=1
|
||||
declare -i do_push=1
|
||||
|
||||
|
||||
while test $# -gt 0
|
||||
|
@ -72,6 +73,10 @@ function main {
|
|||
do_git=0
|
||||
shift
|
||||
;;
|
||||
--no-push )
|
||||
do_push=0
|
||||
shift
|
||||
;;
|
||||
* )
|
||||
err_usage "ERROR: Unknown argument: '$1'"
|
||||
return 1
|
||||
|
@ -86,11 +91,14 @@ function main {
|
|||
status_stage "==> Commiting Dev Mode Changes"
|
||||
commit_dev_mode "${sdir}" || return 1
|
||||
|
||||
status_stage "==> Confirming Git Changes"
|
||||
confirm_git_push_changes "${sdir}" || return 1
|
||||
|
||||
status_stage "==> Pushing to Git"
|
||||
git_push_ref "${sdir}" || return 1
|
||||
if is_set "${do_push}"
|
||||
then
|
||||
status_stage "==> Confirming Git Changes"
|
||||
confirm_git_push_changes "${sdir}" || return 1
|
||||
|
||||
status_stage "==> Pushing to Git"
|
||||
git_push_ref "${sdir}" || return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue