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

chore: update makefiles

parent 25251846
No related branches found
No related tags found
No related merge requests found
Showing
with 994 additions and 51 deletions
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
GIT_CHGLOG_BIN := $(shell command -v git-chglog 2> /dev/null) GIT_CHGLOG_BIN := $(shell command -v git-chglog 2> /dev/null)
GIT_CHGLOG_CONFIG_DIR := $(PROJECT_ROOT).chglog
REPOSURL := $(subst .git,,$(subst $(shell git config --get user.name)@,,$(shell git config --get remote.origin.url)))
ifeq ($(GO),) ifeq ($(GO),)
$(error $(ERRORMARKER) GO is not defined) $(error $(ERRORMARKER) GO is not defined)
...@@ -15,8 +17,124 @@ endif ...@@ -15,8 +17,124 @@ endif
ifeq ($(GIT_CHGLOG_BIN),) ifeq ($(GIT_CHGLOG_BIN),)
$(shell $(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest) $(shell $(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest)
GIT_CHGLOG_BIN := $(shell command -v git-chglog 2> /dev/null)
endif
ifneq ($(shell test -d $(GIT_CHGLOG_CONFIG_DIR) && echo -n yes),yes)
$(shell mkdir -p $(GIT_CHGLOG_CONFIG_DIR))
endif endif
remove-config-files:
$(shell rm -Rf $(GIT_CHGLOG_CONFIG_DIR)/ && mkdir -p $(GIT_CHGLOG_CONFIG_DIR))
.PHONY: update-chglog-files
## update standard git-chglog configuration files
update-chglog-files: remove-config-files $(GIT_CHGLOG_CONFIG_DIR)/config.yml $(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md
$(ECHOMARKER) "update standard git-chglog configuration files"
define GIT_CHGLOG_CONFIG_FILE
style: gitlab
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: $(REPOSURL)
options:
commits:
filters:
Type:
- feat
- fix
- doc
- refactor
- perf
- test
- chore
## deprecated types and typos
- docs
- documentation
- feat
- added
- add
- bugfix
- revert
- update
- updates
- change
- changed
commit_groups:
title_maps:
feat: Add Features
fix: Bug Fixes
doc: Documentation
refactor: Code Refactoring
perf: Performance Improvements
test: Tests
## Chore is used for all other changes that don't fit in the other categories
chore: Changes
## deprecated types and typos
docs: Documentation
documentation: Documentation
added: Add Features
add: Add Features
bugfix: Bug Fixes
revert: Reverts
update: Changes
updates: Changes
change: Changes
changed: Changes
header:
pattern: "^(\\w*)(?:\\(([\\w\\$$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
endef
export GIT_CHGLOG_CONFIG_FILE
$(GIT_CHGLOG_CONFIG_DIR)/config.yml:
$(QUIET) $(ECHO) "$$GIT_CHGLOG_CONFIG_FILE" >> $@
define GIT_CHGLOG_CONFIG_TEMPLATE
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- if .Versions }}
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $$.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
endef
export GIT_CHGLOG_CONFIG_TEMPLATE
$(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md:
$(QUIET) $(ECHO) "$$GIT_CHGLOG_CONFIG_TEMPLATE" >> $@
## location of CHANGELOG.md file ## location of CHANGELOG.md file
CHANGELOG_FILE ?= $(PROJECT_ROOT)CHANGELOG.md CHANGELOG_FILE ?= $(PROJECT_ROOT)CHANGELOG.md
EXECUTABLES = $(EXECUTABLES:-) $(GIT_CHGLOG_BIN) EXECUTABLES = $(EXECUTABLES:-) $(GIT_CHGLOG_BIN)
...@@ -26,9 +26,11 @@ SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/ ...@@ -26,9 +26,11 @@ SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/
DEVELOPMENT_SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/ DEVELOPMENT_SCRIPTS_PATH ?= $(DEVELOPMENT_PATH)script/
BUILD_PATH ?= $(DEPLOYMENT_PATH)build/ BUILD_PATH ?= $(DEPLOYMENT_PATH)build/
VENDOR_PATH ?= $(DEPLOYMENT_PATH)vendor/ VENDOR_PATH ?= $(DEPLOYMENT_PATH)vendor/
TEST_PATH ?= $(DEVELOPMENT_PATH)test/ ALVINE_VENDOR_PATH ?= $(VENDOR_PATH)alvine/
TEST_PATH ?= $(DEVELOPMENT_PATH)tests/
DEPLOYMENT_SCRIPTS_PATH ?= $(DEPLOYMENT_PATH)script/ DEPLOYMENT_SCRIPTS_PATH ?= $(DEPLOYMENT_PATH)script/
LICENSE_PATH ?= $(PROJECT_ROOT)
PROJECT_DIRECTORIES := $(PROJECT_DIRECTORIES) \ PROJECT_DIRECTORIES := $(PROJECT_DIRECTORIES) \
$(APPLICATION_PATH) \ $(APPLICATION_PATH) \
...@@ -37,11 +39,14 @@ PROJECT_DIRECTORIES := $(PROJECT_DIRECTORIES) \ ...@@ -37,11 +39,14 @@ PROJECT_DIRECTORIES := $(PROJECT_DIRECTORIES) \
$(WEB_PATH) \ $(WEB_PATH) \
$(DEPLOYMENT_PATH) \ $(DEPLOYMENT_PATH) \
$(VENDOR_PATH) \ $(VENDOR_PATH) \
$(ALVINE_VENDOR_PATH) \
$(TEST_PATH) \
$(DEVELOPMENT_PATH) \ $(DEVELOPMENT_PATH) \
$(DEVELOPMENT_SCRIPTS_PATH) \ $(DEVELOPMENT_SCRIPTS_PATH) \
$(DEPLOYMENT_SCRIPTS_PATH) \ $(DEPLOYMENT_SCRIPTS_PATH) \
$(DOCUMENTATION_PATH) \ $(DOCUMENTATION_PATH) \
$(REQUIREMENT_PATH) \ $(REQUIREMENT_PATH) \
$(CREDENTIALS_PATH) \ $(CREDENTIALS_PATH) \
$(LICENSE_PATH) \
$(BUILD_PATH) $(BUILD_PATH)
...@@ -8,8 +8,13 @@ ...@@ -8,8 +8,13 @@
define GITIGNOREDS define GITIGNOREDS
# Makefile comes from update
Makefile.example Makefile.example
# Vendor
/development/vendor/
/deployment/vendor/
# Created by https://www.toptal.com/developers/gitignore/api/intellij+iml,phpunit,git,vim,visualstudiocode,phpstorm,go,intellij+all,netbeans,dbeaver,node,yarn # Created by https://www.toptal.com/developers/gitignore/api/intellij+iml,phpunit,git,vim,visualstudiocode,phpstorm,go,intellij+all,netbeans,dbeaver,node,yarn
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+iml,phpunit,git,vim,visualstudiocode,phpstorm,go,intellij+all,netbeans,dbeaver,node,yarn # Edit at https://www.toptal.com/developers/gitignore?templates=intellij+iml,phpunit,git,vim,visualstudiocode,phpstorm,go,intellij+all,netbeans,dbeaver,node,yarn
...@@ -518,8 +523,8 @@ tags ...@@ -518,8 +523,8 @@ tags
endef endef
export GITIGNOREDS export GITIGNOREDS
.gitignore: $(PROJECT_ROOT).gitignore:
$(QUITE) $(ECHO) "$$GITIGNOREDS" >> $@ $(QUIET) $(ECHO) "$$GITIGNOREDS" >> $@
...@@ -14,3 +14,14 @@ EXECUTABLES = $(EXECUTABLES:-) $(GO); ...@@ -14,3 +14,14 @@ EXECUTABLES = $(EXECUTABLES:-) $(GO);
ifeq ($(shell command -v $(GO) 2> /dev/null),) ifeq ($(shell command -v $(GO) 2> /dev/null),)
$(error "go is not installed. Please install go <https://go.dev/doc/install>") $(error "go is not installed. Please install go <https://go.dev/doc/install>")
endif endif
GOPATH=$(shell go env GOPATH)
ifeq ($(GOPATH),)
DIRS := bin pkg src
GOPATH=$(DEPLOYMENT_PATH)/go/
$(shell mkdir -p $(GOPATH))
$(shell $(foreach entry,$(DIRS),mkdir -p "$(GOPATH)$(entry)";))
export PATH=$(PATH):$(GOPATH)/bin
endif
...@@ -112,4 +112,4 @@ endef ...@@ -112,4 +112,4 @@ endef
export JSDOCJSON export JSDOCJSON
$(DEPLOYMENT_PATH)jsdoc.json: $(DEPLOYMENT_PATH)jsdoc.json:
$(QUITE) $(ECHO) "$$JSDOCJSON" >> $@ $(QUIET) $(ECHO) "$$JSDOCJSON" >> $@
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
...@@ -17,3 +17,39 @@ COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT). ...@@ -17,3 +17,39 @@ COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT).
## The owner of the project ## The owner of the project
COPYRIGHT_OWNER ?= schukai GmbH COPYRIGHT_OWNER ?= schukai GmbH
COPYRIGHT_URL ?= [LICENSE](https://www.schukai.com/)
define LICENSE_FILE_CONTENT
The schukai Enterprise License (the "Enterprise License").
Copyright © 2022 schukai GmbH.
Regarding this Software, schukai GmbH is the licensor and you are the licensee.
By using the Software, you agree to all the terms and conditions set forth below.
This software and associated documentation files (the "Software") may be used in production only if you (and any company
you represent) have a valid Enterprise License corresponding to your use. Subject to the preceding sentence, you are free
to modify this Software and to release patches for the Software. You agree that schukai and/or its licensors (as applicable)
retain all right, title and interest in and to all such modifications and/or patches, and that all such modifications
and/or patches may be used, copied, modified, displayed, distributed or otherwise exploited only with a valid Enterprise
License for the appropriate use. Notwithstanding the foregoing, you may copy and modify the Software for development and
testing purposes without requiring a subscription.
You agree that schukai and/or its licensors (if applicable) retain all right, title and interest in and to all such
modifications. No additional rights are granted to you beyond those expressly set forth herein. Subject to the foregoing,
you may not copy, merge, publish, distribute, sublicense and/or sell the Software.
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIMS, DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
For any third-party components incorporated into schukai's software, such components are licensed under the original license
provided by the owner of the applicable component.
endef
...@@ -15,5 +15,7 @@ SPDX_LICENSE_ID ?= ...@@ -15,5 +15,7 @@ SPDX_LICENSE_ID ?=
## Copyright holder of the project ## Copyright holder of the project
COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT). COPYRIGHT_TEXT ?= © schukai GmbH, $(LICENSE_TEXT).
COPYRIGHT_URL ?= [LICENSE](https://www.schukai.com/)
## The owner of the project ## The owner of the project
COPYRIGHT_OWNER ?= schukai GmbH COPYRIGHT_OWNER ?= schukai GmbH
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
ifneq "$(wildcard $(SOURCE_PATH) )" ""
## Files wich should be checked for license headers ## Files wich should be checked for license headers
LICENSE_FILE_PATTERN ?= ./*(.go|js|php) LICENSE_FILE_PATTERN ?= $(shell find $(SOURCE_PATH) -type f \( -iname \*.go -o -iname \*.php -o -iname \*.js -o -iname \*.mjs -o -iname \*.cjs \) )
endif
# https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/ # https://spdx.github.io/spdx-spec/v2.3/SPDX-license-list/
ADDLICENSE_BIN ?= addlicense ADDLICENSE_BIN ?= addlicense
......
...@@ -16,7 +16,7 @@ EXECUTABLES = $(EXECUTABLES:-) $(NPM); ...@@ -16,7 +16,7 @@ EXECUTABLES = $(EXECUTABLES:-) $(NPM);
NODE_PACKAGES := $(shell find $(PROJECT_ROOT) -type f -name 'package.json' -not -path '*/node_modules/*') NODE_PACKAGES := $(shell find $(PROJECT_ROOT) -type f -name 'package.json' -not -path '*/node_modules/*')
NODE_MODULES := $(shell find $(PROJECT_ROOT) -type d -name 'node_modules' -prune) NODE_MODULES := $(shell find $(PROJECT_ROOT) -type d -name 'node_modules' -prune)
NODE_MODULES_MODIFIED := $(shell find . -type f -name 'package.json' -not -path '*/node_modules/*' -exec sh -c 'F=$$(dirname {}); echo $${F}/node_modules/.modified' \;) NODE_MODULES_MODIFIED := $(shell find $(PROJECT_ROOT) -type f -name 'package.json' -not -path '*/node_modules/*' -exec sh -c 'F=$$(dirname {}); echo $${F}/node_modules/.modified' \;)
$(NODE_MODULES_MODIFIED): $(NODE_PACKAGES) $(NODE_MODULES_MODIFIED): $(NODE_PACKAGES)
$(ECHOMARKER) "Updating node modules..." $(ECHOMARKER) "Updating node modules..."
...@@ -24,8 +24,10 @@ $(NODE_MODULES_MODIFIED): $(NODE_PACKAGES) ...@@ -24,8 +24,10 @@ $(NODE_MODULES_MODIFIED): $(NODE_PACKAGES)
DIR=$$(dirname $$p); \ DIR=$$(dirname $$p); \
echo "Updating package: $${DIR}" ;\ echo "Updating package: $${DIR}" ;\
$(NPM) install --prefix $${DIR} ;\ $(NPM) install --prefix $${DIR} ;\
done ; \ if [ -d $${DIR}/node_modules/ ]; then \
touch $(NODE_MODULES_MODIFIED) touch $${DIR}/node_modules/.modified ;\
fi ;\
done
## Main Develpoment Node Repos ## Main Develpoment Node Repos
NODE_ROOT_DIR ?= $(DEVELOPMENT_PATH) NODE_ROOT_DIR ?= $(DEVELOPMENT_PATH)
...@@ -42,11 +44,12 @@ MOCHA ?= $(NODE_MODULES_BIN_DIR)mocha ...@@ -42,11 +44,12 @@ MOCHA ?= $(NODE_MODULES_BIN_DIR)mocha
PACKAGE_JSON ?= $(NODE_ROOT_DIR)package.json PACKAGE_JSON ?= $(NODE_ROOT_DIR)package.json
ifneq "$(wildcard $(SOURCE_PATH) )" ""
MJS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs') MJS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs')
MJS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs' -exec realpath --relative-to $(PROJECT_ROOT) {} \; ) MJS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.mjs' -exec realpath --relative-to $(PROJECT_ROOT) {} \; )
JS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js') JS_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js')
JS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js' -exec realpath --relative-to $(PROJECT_ROOT) {} \; ) JS_RELATIVE_SOURCE_FILES := $(shell find $(SOURCE_PATH) -name '*.js' -exec realpath --relative-to $(PROJECT_ROOT) {} \; )
endif
...@@ -17,7 +17,11 @@ endif ...@@ -17,7 +17,11 @@ endif
.PHONY: add-licenses .PHONY: add-licenses
## Add license headers to all go files ## Add license headers to all go files
add-licenses: add-licenses:
$(ECHOMARKER) "Add license headers to all go files" $(ECHOMARKER) "Add license headers to all sourche files"
ifeq ($(LICENSE_FILE_PATTERN),)
$(error "LICENSE_FILE_PATTERN is not set. Please check your makefile and include the licenses.mk")
endif
ifndef SPDX_LICENSE_ID ifndef SPDX_LICENSE_ID
$(error "SPDX_LICENSE_ID is not defined. Please check your makefile and include the licenses.mk") $(error "SPDX_LICENSE_ID is not defined. Please check your makefile and include the licenses.mk")
endif endif
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
CONAN_BIN ?= $(VENDOR_PATH)conan ifeq ($(CONAN_BIN),)
CONAN_CONFIG ?= $(VENDOR_PATH)conan.conf $(error $(ERRORMARKER) Conan is not defined, check your Makefile if conan.mk is included)
endif
$(CONAN_BIN): $(CONAN_BIN):
$(QUIET) $(MKDIR) -p $(VENDOR_PATH) $(QUIET) $(MKDIR) -p $(VENDOR_PATH)
...@@ -16,6 +18,5 @@ $(CONAN_BIN): ...@@ -16,6 +18,5 @@ $(CONAN_BIN):
.PHONY: run-conan .PHONY: run-conan
## run conan webserver ## run conan webserver
run-conan: $(CONAN_BIN) run-conan: $(CONAN_BIN) $(CONAN_CONFIG)
$(QUIET) $(CONAN_BIN) server serve -config $(CONAN_CONFIG) $(QUIET) $(CONAN_BIN) server serve --config $(CONAN_CONFIG)
...@@ -11,11 +11,17 @@ ifeq ($(GO),) ...@@ -11,11 +11,17 @@ ifeq ($(GO),)
endif endif
GO_MOD_FILE := $(SOURCE_PATH)go.mod GO_MOD_FILE := $(SOURCE_PATH)go.mod
GO_LICENSES_BIN := $(shell command -v go-licenses)
ifeq ($(GO_LICENSES_BIN),)
$(shell $(GO) install github.com/google/go-licenses@latest)
GO_LICENSES_BIN := $(shell command -v go-licenses 2> /dev/null)
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif
ifeq ($(shell test -e $(GO_MOD_FILE) && echo -n yes),yes) ifeq ($(shell test -e $(GO_MOD_FILE) && echo -n yes),yes)
GO_CURRENT_MODULE := $(shell cat $(GO_MOD_FILE) | head -n1 | cut -d" " -f2) GO_CURRENT_MODULE := $(shell cat $(GO_MOD_FILE) | head -n1 | cut -d" " -f2)
# go install github.com/google/go-licenses@latest
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif endif
.PHONY: go-fetch-licenses .PHONY: go-fetch-licenses
......
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
## ##
## INIT-TARGETS ## INIT-STANDARD
## ##
############################################################################################# #############################################################################################
############################################################################################# #############################################################################################
...@@ -9,12 +9,41 @@ ...@@ -9,12 +9,41 @@
# @see .PHONY https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html#Phony-Targets # @see .PHONY https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html#Phony-Targets
.PHONY: init-standard .PHONY: init-standard
## init standard project
init-standard: .gitignore
# The default directories are defined in the # The default directories are defined in the
# directories-standard.mk file, but all other # directories-standard.mk file, but all other
# targets can define directories as well. # targets can define directories as well.
$(ECHOMARKER) "Run init-standard"
$(PROJECT_DIRECTORIES):
$(foreach path,$(PROJECT_DIRECTORIES),\ $(foreach path,$(PROJECT_DIRECTORIES),\
$(shell $(MKDIR) -p $(path))) $(shell $(MKDIR) -p $(path)))
## init standard project
init-standard: $(PROJECT_DIRECTORIES) $(PROJECT_ROOT).gitignore $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE
$(ECHOMARKER) "Run init-standard"
$(ECHO) "Done" $(ECHO) "Done"
#############################################################################################
#############################################################################################
##
## LICENSE
##
#############################################################################################
#############################################################################################
export LICENSE_FILE_CONTENT
$(LICENSE_PATH)LICENSE:
$(QUIET) $(ECHO) "$$LICENSE_FILE_CONTENT" >> $@
#############################################################################################
#############################################################################################
##
## README
##
#############################################################################################
#############################################################################################
export README_FILE_CONTENT
$(PROJECT_ROOT)README.md:
$(QUIET) $(ECHO) "$$README_FILE_CONTENT" >> $@
#############################################################################################
#############################################################################################
##
## JEKYLL-TARGETS
##
#############################################################################################
#############################################################################################
JEKYLL_VERSION := snapshot
JEKYLL_BIN := $(ALVINE_VENDOR_PATH)jekyll-$(JEKYLL_VERSION).phar
JEKYLL_PUBKEY := $(JEKYLL_BIN).pubkey
$(JEKYLL_PUBKEY):
$(MKDIR) -p $(ALVINE_VENDOR_PATH)
$(WGET) -O $(JEKYLL_PUBKEY) http://download.alvine.io/phar/jekyll-$(JEKYLL_VERSION).phar.pubkey
$(JEKYLL_BIN): $(JEKYLL_PUBKEY)
$(MKDIR) -p $(ALVINE_VENDOR_PATH)
$(WGET) -O $(JEKYLL_BIN) http://download.alvine.io/phar/jekyll-$(JEKYLL_VERSION).phar
$(CHMOD) u+x $(JEKYLL_BIN)
.PHONY: run-jekyll
## run jekyll
run-jekyll: init $(JEKYLL_BIN) $(JEKYLL_PUBKEY) $(TEMP_PATH)jekyll.lock
$(ECHOMARKER) "Jekyll finished"
.PHONY: run-jekyll-force
## run jekyll (-f)
run-jekyll-force: init $(JEKYLL_BIN) $(JEKYLL_PUBKEY)
$(RM) $(TEMP_PATH)jekyll.lock
$(MAKE) run-jekyll
$(ECHOMARKER) "Jekyll finished"
$(TEMP_PATH)jekyll.lock: $(THIS_DIR).jekyll
$(ECHOMARKER) "Run Jekyll"
$(JEKYLL_BIN) fetch --force
$(JEKYLL_BIN) update
touch $(TEMP_PATH)jekyll.lock
\ No newline at end of file
...@@ -17,10 +17,8 @@ node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES) ...@@ -17,10 +17,8 @@ node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES)
$(ECHO) "Version: $(PROJECT_VERSION)" $(ECHO) "Version: $(PROJECT_VERSION)"
$(ECHO) "Source Path: $(SOURCE_PATH)" $(ECHO) "Source Path: $(SOURCE_PATH)"
$(QUIET) $(JQ) '.version = "$(PROJECT_VERSION)"' $(PACKAGE_JSON) | $(SPONGE) $(PACKAGE_JSON) $(QUIET) $(JQ) '.version = "$(PROJECT_VERSION)"' $(PACKAGE_JSON) | $(SPONGE) $(PACKAGE_JSON)
$(QUIET) for p in $(NODE_PACKAGES); do \ $(QUIET) for p in $(NODE_PACKAGES); do $(JQ) '.version = "$(PROJECT_VERSION)"' $${p} | $(SPONGE) $${p}; done
$(JQ) '.version = "$(PROJECT_VERSION)"' $${p} | $(SPONGE) $${p}; \ $(QUIET) $(SCRIPTS_PATH)update-version.sh
done ; \ $(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run --if-present build
$(NPM) --prefix $(NODE_ROOT_DIR) run build
...@@ -8,25 +8,28 @@ ...@@ -8,25 +8,28 @@
.PHONY: npm-publish-major .PHONY: npm-publish-major
## release major version of package ## release major version of package
npm-publish-major: node-test npm-publish-major:
$(ECHOMARKER) "release major version" $(ECHOMARKER) "release major version"
$(QUIET) $(MAKE) next-major-version $(QUIET) $(MAKE) tag-major-version
$(QUIET) $(MAKE) node-build $(QUIET) $(MAKE) node-build
$(QUIET) $(MAKE) node-test
$(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish $(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish
.PHONY: npm-publish-minor .PHONY: npm-publish-minor
## release minor version of package ## release minor version of package
npm-publish-minor: node-test npm-publish-minor:
$(ECHOMARKER) "release minor version" $(ECHOMARKER) "release minor version"
$(QUIET) $(MAKE) next-minor-version $(QUIET) $(MAKE) tag-minor-version
$(QUIET) $(MAKE) node-build $(QUIET) $(MAKE) node-build
$(QUIET) $(MAKE) node-test
$(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish $(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish
.PHONY: npm-publish-patch .PHONY: npm-publish-patch
## release patch version of package ## release patch version of package
npm-publish-patch: node-test npm-publish-patch:
$(ECHOMARKER) "release patch version" $(ECHOMARKER) "release patch version"
$(QUIET) $(MAKE) next-patch-version $(QUIET) $(MAKE) tag-patch-version
$(QUIET) $(MAKE) node-build $(QUIET) $(MAKE) node-build
$(QUIET) $(MAKE) node-test
$(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish $(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run publish
...@@ -47,7 +47,7 @@ check-clean-repo: ...@@ -47,7 +47,7 @@ check-clean-repo:
$(QUIET) $(GIT) diff-index --quiet HEAD || (echo "There are uncommitted changes after running make. Please commit or stash them before running make."; exit 1) $(QUIET) $(GIT) diff-index --quiet HEAD || (echo "There are uncommitted changes after running make. Please commit or stash them before running make."; exit 1)
## tag repository with next patch version ## tag repository with next patch version
tag-patch-version: next-patch-version tag-patch-version: $(GIT_CHGLOG_CONFIG_DIR)/config.yml $(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md next-patch-version
$(ECHOMARKER) "Tagging patch version" $(ECHOMARKER) "Tagging patch version"
$(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version)) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
$(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE) $(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE)
...@@ -55,7 +55,7 @@ tag-patch-version: next-patch-version ...@@ -55,7 +55,7 @@ tag-patch-version: next-patch-version
$(QUIET) $(GIT) tag -a v$(PROJECT_VERSION) -m "Version $(PROJECT_VERSION)" $(QUIET) $(GIT) tag -a v$(PROJECT_VERSION) -m "Version $(PROJECT_VERSION)"
## tag repository with next minor version ## tag repository with next minor version
tag-minor-version: next-minor-version tag-minor-version: $(GIT_CHGLOG_CONFIG_DIR)/config.yml $(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md next-minor-version
$(ECHOMARKER) "Tagging minor version" $(ECHOMARKER) "Tagging minor version"
$(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version)) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
$(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE) $(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE)
...@@ -63,7 +63,7 @@ tag-minor-version: next-minor-version ...@@ -63,7 +63,7 @@ tag-minor-version: next-minor-version
$(QUIET) $(GIT) tag -a v$(PROJECT_VERSION) -m "Version $(PROJECT_VERSION)" $(QUIET) $(GIT) tag -a v$(PROJECT_VERSION) -m "Version $(PROJECT_VERSION)"
## tag repository with next major version ## tag repository with next major version
tag-major-version: next-major-version tag-major-version: $(GIT_CHGLOG_CONFIG_DIR)/config.yml $(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md next-major-version
$(ECHOMARKER) "Tagging major version" $(ECHOMARKER) "Tagging major version"
$(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version)) $(eval PROJECT_VERSION := $(shell cat $(RELEASE_FILE) | jq -r .version))
$(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE) $(GIT_CHGLOG_BIN) --next-tag v$(PROJECT_VERSION) -o $(CHANGELOG_FILE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment