diff --git a/.markdownlint.yml b/.markdownlint.yml new file mode 100644 index 0000000..d316d68 --- /dev/null +++ b/.markdownlint.yml @@ -0,0 +1,5 @@ +--- +# MD013/line-length - Line length +MD013: + # Number of characters + line_length: 120 diff --git a/.releaserc b/.releaserc index 8c29a58..727d5b8 100644 --- a/.releaserc +++ b/.releaserc @@ -2,7 +2,22 @@ "branches": ["main"], "debug": "true", "plugins": [ - "@semantic-release/commit-analyzer", + [ + "@semantic-release/commit-analyzer", + { + "preset": "angular", + "releaseRules": [ + { + "type": "build", + "scope": "debs", + "release": "patch", + } + ], + "parserOpts": { + "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"], + }, + }, + ], "@semantic-release/release-notes-generator", [ "@semantic-release/changelog", diff --git a/README.md b/README.md index 762296a..ed645c8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ You can check your xml against: - DTD `xmllint --dtdvalid schema.dtd --noout file.txt` - - XSD `xmllint --schema schema.xsd --noout file.xml` diff --git a/run-ci.sh b/run-ci.sh new file mode 100644 index 0000000..2f570cd --- /dev/null +++ b/run-ci.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e +set +x + +echo "Running local CI ..." + +echo "Running lints ..." + +echo "Lint markdown ..." +docker run --rm -v "$(pwd):/app" docdee/mdlint -c /app/.markdownlint.yml -i CHANGELOG.md "**/*.md" + +echo "Lint shell scripts ..." +docker run --rm -v "$(pwd):/app" koalaman/shellcheck-alpine:stable find /app -type f -name '*.sh' -exec shellcheck {} + + +echo "Lint Dockerfiles ..." +docker_linter_version="$(docker run --rm -i ghcr.io/hadolint/hadolint hadolint -v)" +echo "Using docker-linter version: ${docker_linter_version}" +dockerfiles=$(find . -type f -name "*Dockerfile" -not -path "./vendor/*" -not -path "./tmp/*") +for dockerfile in ${dockerfiles}; do + echo "> lint file: $dockerfile" + docker run --rm -i -v "${PWD}/.hadolint.yml:/.config/hadolint.yml" ghcr.io/hadolint/hadolint < "$dockerfile" +done + +echo "CI successfully finished."