Skip to content
Snippets Groups Projects
Verified Commit 29a54dc7 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent 39b83893
No related branches found
No related tags found
No related merge requests found
#############################################################################################
#############################################################################################
##
## VARIABLES-TARGETS
##
#############################################################################################
#############################################################################################
.PHONY: variables
## Print all variables
variables:
@$(foreach v, $(.VARIABLES), $(if $(filter file,$(origin $(v))), $(info $(INFO)$(v)$(RESET)=$($(v))$(RESET))))
\ No newline at end of file
#############################################################################################
#############################################################################################
##
## TERMINAL CHECK
##
#############################################################################################
#############################################################################################
# Executable Programs the Installed be have to
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "Missing $(exec) in PATH; please install")))
\ No newline at end of file
#############################################################################################
#############################################################################################
##
## COMMANDS
##
#############################################################################################
#############################################################################################
# Use bash instead of sh
## Sets the shell used
SHELL = bash
# path and binaries
AWK ?= awk
CP ?= cp
CD ?= cd
KILL ?= kill
MV ?= mv
RM ?= rm
MKDIR ?= mkdir
SED ?= sed
FIND ?= find
SORT ?= sort
TOUCH ?= touch
WGET ?= wget
CHMOD ?= chmod
RSYNC ?= rsync
XARGS ?= xargs
GREP ?= grep
MAKE ?= make
GIT ?= git
LN ?= ln
TOUCH ?= touch
TEST ?= test
JQ ?= jq
EXECUTABLES = $(EXECUTABLES:-) $(JQ) $(AWK) $(CP) $(KILL) $(MV) $(SED) $(FIND) $(SORT) $(TOUCH) $(WGET) $(CHMOD) $(RSYNC) $(XARGS) $(GREP) $(MAKE) $(GIT)
\ No newline at end of file
#############################################################################################
#############################################################################################
##
## VERSIONS
##
#############################################################################################
#############################################################################################
VERSION_BIN := version
EXECUTABLES = $(EXECUTABLES:-) $(VERSION_BIN)
RELEASE_FILE ?= $(PROJECT_ROOT)release.json
ifeq ("$(wildcard $(RELEASE_FILE))","")
$(shell echo '{"version":"0.1.0"}' > $(RELEASE_FILE))
endif
PROJECT_VERSION ?= $(shell cat $(RELEASE_FILE) | jq -r .version)
PROJECT_BUILD_DATE ?= $(shell $(VERSION_BIN) date)
.PHONY: next-patch-version
## create next patch version
next-patch-version:
$(ECHOMARKER) "Creating next version"
$(QUIET) $(VERSION_BIN) patch --path $(RELEASE_FILE) --selector "version"
$(QUIET) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
.PHONY: next-minor-version
## create next minor version
next-minor-version:
$(ECHOMARKER) "Creating next minor version"
$(QUIET) $(VERSION_BIN) minor --path $(RELEASE_FILE) --selector "version"
$(QUIET) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
.PHONY: next-major-version
## create next major version
next-major-version:
$(ECHOMARKER) "Creating next minor version"
$(QUIET) $(VERSION_BIN) major --path $(RELEASE_FILE) --selector "version"
$(QUIET) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
## Project directory in which the Makefiles should be located
MAKEFILE_IMPORT_PATH=$(PROJECT_ROOT)development/makefile/
{"version":"0.1.0"}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment