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

chore: update makefiles and golibs

parent 69dbb6f9
No related branches found
No related tags found
No related merge requests found
......@@ -18,11 +18,41 @@ compile: next-patch-version
$(ECHOMARKER) "Compiling for every OS and Platform"
$(ECHO) "Version: $(PROJECT_VERSION)"
$(ECHO) "Build: $(PROJECT_BUILD_DATE)"
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)/go-compile.sh $(SOURCE_PATH) $(BUILD_PATH) $(COMPONENT_SLUG) $(GO_RELEASE_PACKAGE_NAME) $(PROJECT_VERSION) $(PROJECT_BUILD_DATE)
.PHONY: go-lint
## Lint the files
go-lint:
$(QUIET) $(GOLINT) -set_exit_status ${PKG_LIST}
.PHONY: go-test
## Run unittests
go-test:
$(QUIET) $(GO) test -short ${PKG_LIST}
.PHONY: go-race
## Run data race detector
go-race: go-dep
$(QUIET) $(GO) test -race -short ${PKG_LIST}
.PHONY: go-msan
## Run memory sanitizer
go-msan: go-dep
$(QUIET) $(GO) test -msan -short ${PKG_LIST}
.PHONY: go-coverage
## Generate global code coverage report
go-coverage:
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)/go-coverage.sh $(SOURCE_PATH) $(DEVELOPMENT_PATH)/report ;
.PHONY: go-cover-html
## Generate global code coverage report in HTML
go-cover-html:
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)/go-coverage.sh $(SOURCE_PATH) $(DEVELOPMENT_PATH)/report html;
.PHONY: go-dep
## Get the dependencies
go-dep:
$(QUIET) cd $(SOURCE_PATH); $(GO) get -v -d ./... ; cd -;
$(QUIET) cd $(SOURCE_PATH) ; \
GO111MODULE=on GOOS=linux GOARCH=arm $(GO) build -ldflags "-X $(GO_RELEASE_PACKAGE_NAME).version=$(PROJECT_VERSION) -X $(GO_RELEASE_PACKAGE_NAME).build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-arm ; \
GOOS=linux GOARCH=amd64 $(GO) build -ldflags "-X $(GO_RELEASE_PACKAGE_NAME).version=$(PROJECT_VERSION) -X $(GO_RELEASE_PACKAGE_NAME).build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-amd64 ; \
GOOS=linux GOARCH=arm64 $(GO) build -ldflags "-X $(GO_RELEASE_PACKAGE_NAME).version=$(PROJECT_VERSION) -X $(GO_RELEASE_PACKAGE_NAME).build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-arm64 ; \
GOOS=linux GOARCH=386 $(GO) build -ldflags "-X $(GO_RELEASE_PACKAGE_NAME).version=$(PROJECT_VERSION) -X $(GO_RELEASE_PACKAGE_NAME).build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-linux-386 ; \
GOOS=windows GOARCH=amd64 $(GO) build -ldflags "-X $(GO_RELEASE_PACKAGE_NAME).version=$(PROJECT_VERSION) -X $(GO_RELEASE_PACKAGE_NAME).build=$(PROJECT_BUILD_DATE)" -o $(BUILD_PATH)$(COMPONENT_SLUG)-windows ; \
cd $(PROJECT_ROOT);
......@@ -31,6 +31,6 @@ ifeq ($(GO_CURRENT_MODULE),)
$(QUIET) $(ECHOERRORMARKER) "no go.mod file found, skipping fetching licenses"
else
$(ECHOMARKER) "Fetch licenses"
$(QUIET) cd $(SOURCE_PATH); $(GO_LICENSES_BIN) save $(GO_CURRENT_MODULE) $(GO_LICENSES_IGNORE_PACKAGES) --force --save_path $(DOCUMENTATION_PATH)licenses/ ; cd -
$(QUIET) cd $(SOURCE_PATH); $(GO_LICENSES_BIN) save $(GO_CURRENT_MODULE) $(PKG_LIST) --force --save_path $(DOCUMENTATION_PATH)licenses/ ; cd -
endif
......@@ -14,8 +14,7 @@
# targets can define directories as well.
$(PROJECT_DIRECTORIES):
$(foreach path,$(PROJECT_DIRECTORIES),\
$(shell $(MKDIR) -p $(path)))
$(foreach path,$(PROJECT_DIRECTORIES), $(shell $(MKDIR) -p $(path)))
## init go utilities project
init-go-utilities: $(PROJECT_DIRECTORIES) $(PROJECT_ROOT).gitignore $(PROJECT_ROOT)README.md $(LICENSE_PATH)LICENSE
......
......@@ -74,59 +74,64 @@ define PLATFORM_PARTS_BUILD_PACKAGE_CONTENT
"author": "schukai GmbH",
"license": "see LICENSE file",
"dependencies": {
"@schukai/component-form": "^2.0.2",
"@schukai/component-notify": "^2.0.0",
"@schukai/component-state": "^2.0.1",
"@schukai/component-style": "^0.6.1",
"@schukai/monster": "^2.0.16"
"@schukai/component-form": "^3.3.1",
"@schukai/component-notify": "^2.3.0",
"@schukai/component-state": "^2.3.0",
"@schukai/component-style": "^0.28.0",
"@schukai/monster": "^3.12.1"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.4.0",
"@semantic-release/changelog": "^6.0.1",
"@peculiar/webcrypto": "^1.4.1",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^9.4.2",
"cli-real-favicon": "^0.0.8",
"@semantic-release/npm": "^9.0.1",
"@semantic-release/gitlab": "^10.1.4",
"@semantic-release/npm": "^9.0.2",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"autoprefixer": "^10.4.13",
"btoa": "^1.2.1",
"c8": "^7.12.0",
"chai": "^4.3.6",
"glob": "^8.0.3",
"chai": "^4.3.7",
"chai-dom": "^1.11.0",
"clean-jsdoc-theme": "^4.1.6",
"clean-jsdoc-theme": "^4.2.6",
"cli-real-favicon": "^0.0.8",
"create-polyfill-service-url": "^2.2.6",
"crypt": "^0.0.2",
"cssnano": "^5.1.14",
"esbuild": "^0.14.53",
"flow-bin": "^0.184.0",
"esbuild": "^0.17.8",
"flow-bin": "^0.199.1",
"fs": "^0.0.1-security",
"glob": "^8.1.0",
"graphviz": "^0.0.9",
"jsdoc": "^3.6.11",
"jsdoc": "^4.0.0",
"jsdoc-external-example": "github:volker-schukai/jsdoc-external-example",
"jsdom": "^19.0.0",
"jsdom": "^21.1.0",
"jsdom-global": "^3.0.2",
"mocha": "^10.0.0",
"postcss": "^8.4.19",
"mocha": "^10.2.0",
"npm-check-updates": "^16.7.4",
"postcss": "^8.4.21",
"postcss-color-mod-function": "^3.0.3",
"postcss-fluid": "^1.4.2",
"postcss-for": "^2.1.1",
"postcss-import": "^15.0.0",
"postcss-import": "^15.1.0",
"postcss-mixins": "^9.0.4",
"postcss-nesting": "^10.2.0",
"postcss-nesting": "^11.2.0",
"postcss-normalize": "^10.0.1",
"postcss-responsive-type": "^1.0.0",
"postcss-strip-units": "^2.0.1",
"process": "^0.11.10",
"semantic-release": "^19.0.5",
"sinon": "^14.0.0",
"semantic-release": "^20.1.0",
"sinon": "^15.0.1",
"svgo": "^3.0.2",
"url": "^0.11.0",
"url-exist": "3.0.0",
"util": "^0.12.4",
"vite": "^3.2.3",
"vite-plugin-banner": "^0.6.1",
"vite-plugin-mkcert": "^1.10.1",
"vite-plugin-minify": "^1.5.2"
"url-exist": "3.0.1",
"util": "^0.12.5",
"vite": "^4.1.1",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2",
"vite-plugin-mkcert": "^1.13.0",
"vite-plugin-mpa": "^1.1.4"
}
}
endef
......
......@@ -83,8 +83,9 @@ define WEBCOMPONENTS_PACKAGE_CONTENT
"monster"
],
"dependencies": {
"@popperjs/core": "^2.9.2",
"@schukai/monster": "^2.0.8"
"@popperjs/core": "^2.11.6",
"@schukai/component-style": "^0.27.1",
"@schukai/monster": "^3.10.1"
},
"main": "source/component.mjs",
"module": "source/component.mjs",
......@@ -123,39 +124,64 @@ define WEBCOMPONENTS_BUILD_PACKAGE_CONTENT
"test": "npx mocha --recursive test/cases/",
"web-test": "script/web-test.sh",
"publish": "script/release-and-publish.sh",
"build-doc": "script/build-doc.sh"
"build-doc": "script/build-doc.sh",
"build-style": "node script/build-stylesheets.cjs ."
},
"type": "module",
"author": "schukai GmbH",
"license": "see LICENSE file",
"dependencies": {
"@popperjs/core": "^2.11.2",
"@schukai/monster": "^2.0.8"
"@popperjs/core": "^2.11.6",
"@schukai/component-style": "^0.27.1",
"@schukai/monster": "^3.10.1"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.4.0",
"@oss/web-components-build-tools": "^1.2.8",
"@peculiar/webcrypto": "^1.4.1",
"autoprefixer": "^10.4.13",
"browserslist": "^4.21.5",
"btoa": "^1.2.1",
"c8": "^7.12.0",
"chai": "^4.3.6",
"chai": "^4.3.7",
"chai-dom": "^1.11.0",
"clean-jsdoc-theme": "^4.1.6",
"clean-jsdoc-theme": "^4.2.3",
"create-polyfill-service-url": "^2.2.6",
"crypt": "^0.0.2",
"esbuild": "^0.14.53",
"flow-bin": "^0.184.0",
"fs": "^0.0.1-security",
"cssnano": "^5.1.14",
"esbuild": "^0.17.5",
"flow-bin": "^0.199.1",
"fs": "0.0.1-security",
"glob": "^8.1.0",
"graphviz": "^0.0.9",
"jsdoc": "^3.6.11",
"jsdoc": "^4.0.0",
"jsdoc-external-example": "github:volker-schukai/jsdoc-external-example",
"jsdoc-plantuml": "^1.0.2",
"jsdom": "^19.0.0",
"jsdom": "^21.1.0",
"jsdom-global": "^3.0.2",
"mocha": "^10.0.0",
"mocha": "^10.2.0",
"node-plantuml": "^0.9.0",
"sinon": "^14.0.0",
"postcss": "^8.4.21",
"postcss-fluid": "^1.4.2",
"postcss-for": "^2.1.1",
"postcss-import": "^15.1.0",
"postcss-load-config": "^4.0.1",
"postcss-mixins": "^9.0.4",
"postcss-nested": "^6.0.0",
"postcss-nesting": "^11.1.0",
"postcss-normalize": "^10.0.1",
"postcss-responsive-type": "^1.0.0",
"postcss-rtlcss": "^4.0.1",
"postcss-strip-units": "^2.0.1",
"rome": "^11.0.0",
"sinon": "^15.0.1",
"url": "^0.11.0",
"url-exist": "3.0.0",
"util": "^0.12.4"
"url-exist": "3.0.1",
"util": "^0.12.5",
"vite": "^4.1.1",
"vite-plugin-banner": "^0.7.0",
"vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2",
"vite-plugin-mkcert": "^1.12.0"
}
}
endef
......
#############################################################################################
#############################################################################################
##
......@@ -7,7 +6,13 @@
#############################################################################################
#############################################################################################
FIXBROKENPLANTUML := $(NODE_MODULES_DIR)jsdoc-plantuml/fixBrokenNodeJS.js
ifndef DOCUMENTATION_S3_PATH
$(error $(ERRORMARKER) DOCUMENTATION_S3_PATH is not defined, check your Makefile if jsdoc.mk is included)
endif
ifndef FIXBROKENPLANTUML
$(error $(ERRORMARKER) FIXBROKENPLANTUML is not defined, check your Makefile if jsdoc.mk is included)
endif
.PHONY: jsdoc-build
## generate js api docs
......@@ -21,3 +26,12 @@ $(FIXBROKENPLANTUML).fixed:
$(QUIET) chmod u+x $(FIXBROKENPLANTUML)
$(QUIET) $(NODE) $(FIXBROKENPLANTUML)
$(QUIET) $(TOUCH) $(FIXBROKENPLANTUML).fixed
.PHONY: jsdoc-to-s3
## transfer doc to s3
jsdoc-to-s3: jsdoc-build
$(ECHOMARKER) "transfer doc to s3"
$(QUIET) $(AWS) s3 --recursive --only-show-errors cp $(BUILD_PATH)docs $(DOCUMENTATION_S3_PATH)
......@@ -10,6 +10,14 @@ SPONGE ?= sponge
EXECUTABLES = $(EXECUTABLES:-) $(SPONGE);
.PHONY: node-create-polyfill
## create polyfill.io url
node-create-polyfill: $(MJS_RELATIVE_SOURCE_FILES) $(NODE_PACKAGES)
$(ECHOMARKER) "create and replace polyfill"
$(QUIET) $(DEVELOPMENT_SCRIPTS_PATH)create-polyfill.sh $(MJS_RELATIVE_SOURCE_FILES)
.PHONY: node-build
## Build Node Components
node-build: $(NODE_MODULES_MODIFIED) $(NODE_PACKAGES)
......
#############################################################################################
#############################################################################################
##
## RUN PLAYGROUND
##
#############################################################################################
#############################################################################################
.PHONY: node-run-playground
## run playground (vite)
node-run-playground:
$(ECHOMARKER) "run playground"
$(QUIET) cd $(DEVELOPMENT_PATH)playground; npx vite;
......@@ -26,4 +26,9 @@ npm-preview:
$(QUIET) $(NPM) --prefix $(NODE_ROOT_DIR) run preview
.PHONY: npm-update-all
## Update Node Components
npm-update-all:
$(ECHOMARKER) "Search and Update recursive all node_modules (npm and pnpm)"
$(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname pnpm-lock.yaml -exec bash -c 'cd $$(dirname {} ) ; pwd; pnpm update -Lr ; cd - ' \;
$(QUIET) $(FIND) . -type f ! -path '*node_modules*' -iname package-lock.json -exec bash -c 'cd $$(dirname {} ) ; pwd; npm install -D npm-check-updates; npx npm-check-updates -u; npm install ; cd -' \;
......@@ -57,7 +57,7 @@ $(PHPUNIT_SCRIPT_PATH)/unittests.sh:
$(PHPUNIT_BIN):
$(MKDIR) -p $(PHPUNIT_PATH)
$(WGET) -O $(PHPUNIT_BIN) https://phar.phpunit.de/phpunit-9.phar
$(WGET) -O $(PHPUNIT_BIN) https://phar.phpunit.de/phpunit-10.phar
$(CHMOD) u+x $(PHPUNIT_BIN)
$(CHMOD) u+x $(PHPUNIT_SCRIPT_PATH)/unittests.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment