Added capability to make dev-tree without pushing

No push is the default
This commit is contained in:
Matt Keeler 2018-06-26 11:46:37 -04:00
parent 9651b9a1f9
commit ba2bf40ede
2 changed files with 21 additions and 6 deletions

View File

@ -94,6 +94,13 @@ export GIT_DESCRIBE
export GOTAGS export GOTAGS
export GOLDFLAGS 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 builds binaries for all targets
all: bin all: bin
@ -129,7 +136,7 @@ publish:
@$(SHELL) $(CURDIR)/build-support/scripts/publish.sh $(PUB_GIT_ARG) $(PUB_WEBSITE_ARG) @$(SHELL) $(CURDIR)/build-support/scripts/publish.sh $(PUB_GIT_ARG) $(PUB_WEBSITE_ARG)
dev-tree: dev-tree:
@$(SHELL) $(CURDIR)/build-support/scripts/dev.sh @$(SHELL) $(CURDIR)/build-support/scripts/dev.sh $(DEV_PUSH_ARG)
cov: cov:
gocov test $(GOFILES) | gocov-html > /tmp/coverage.html gocov test $(GOFILES) | gocov-html > /tmp/coverage.html

View File

@ -43,6 +43,7 @@ function main {
declare build_os="" declare build_os=""
declare build_arch="" declare build_arch=""
declare -i do_git=1 declare -i do_git=1
declare -i do_push=1
while test $# -gt 0 while test $# -gt 0
@ -72,6 +73,10 @@ function main {
do_git=0 do_git=0
shift shift
;; ;;
--no-push )
do_push=0
shift
;;
* ) * )
err_usage "ERROR: Unknown argument: '$1'" err_usage "ERROR: Unknown argument: '$1'"
return 1 return 1
@ -86,11 +91,14 @@ function main {
status_stage "==> Commiting Dev Mode Changes" status_stage "==> Commiting Dev Mode Changes"
commit_dev_mode "${sdir}" || return 1 commit_dev_mode "${sdir}" || return 1
status_stage "==> Confirming Git Changes" if is_set "${do_push}"
confirm_git_push_changes "${sdir}" || return 1 then
status_stage "==> Confirming Git Changes"
confirm_git_push_changes "${sdir}" || return 1
status_stage "==> Pushing to Git" status_stage "==> Pushing to Git"
git_push_ref "${sdir}" || return 1 git_push_ref "${sdir}" || return 1
fi
fi fi
return 0 return 0