Compare commits
2 Commits
6ee63b4ea6
...
47cdaffd81
Author | SHA1 | Date | |
---|---|---|---|
47cdaffd81 | |||
661b17eea1 |
29
git_automation/check_commit_msg
Executable file
29
git_automation/check_commit_msg
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Missing argument (commit message). Did you try to run this manually?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
commitTitle="$(cat $1 | head -n1)"
|
||||||
|
|
||||||
|
# ignore merge requests
|
||||||
|
if echo "$commitTitle" | grep -qE "Merge branch"; then
|
||||||
|
echo "Commit hook: ignoring branch merge"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check semantic versioning scheme
|
||||||
|
if ! echo "$commitTitle" | grep -qE '^(feat|fix|docs|style|refactor|perf|test|chore|build|ci|revert)(\([a-z0-9\s\-\_\,]+\))?!?:\s\w'; then
|
||||||
|
echo "Your commit message did not follow semantic versioning: $commitTitle"
|
||||||
|
echo ""
|
||||||
|
echo "Format: <type>(<optional-scope>): <subject>"
|
||||||
|
echo "Example: feat(api): add endpoint"
|
||||||
|
echo ""
|
||||||
|
echo "Valid types: build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test"
|
||||||
|
echo ""
|
||||||
|
echo "Please see"
|
||||||
|
echo "- https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commit-message-format"
|
||||||
|
echo "- https://www.conventionalcommits.org/en/v1.0.0/#summary"
|
||||||
|
exit 1
|
||||||
|
fi
|
1839
poetry.lock
generated
Normal file
1839
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,11 @@ tensorboard = "^2.16.2"
|
|||||||
click = "^8.1.7"
|
click = "^8.1.7"
|
||||||
pyyaml = "^6.0.1"
|
pyyaml = "^6.0.1"
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
python-semantic-release = "^9.7.3"
|
||||||
|
poetry-githooks = "^3.0.1"
|
||||||
|
black = "^24.4.2"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
@ -66,3 +71,68 @@ map2map = "map2map:main.main"
|
|||||||
Repository = "https://git.aquila-consortium.org/aquila-consortium/map2map.git"
|
Repository = "https://git.aquila-consortium.org/aquila-consortium/map2map.git"
|
||||||
Issues = "https://git.aquila-consortium.org/aquila-consortium/map2map/issues/new"
|
Issues = "https://git.aquila-consortium.org/aquila-consortium/map2map/issues/new"
|
||||||
#Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"
|
#Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"
|
||||||
|
|
||||||
|
[tool.githooks]
|
||||||
|
pre-commit="black ."
|
||||||
|
commit-msg="git_automation/check_commit_msg"
|
||||||
|
|
||||||
|
[tool.semantic_release]
|
||||||
|
assets = []
|
||||||
|
version_toml = [
|
||||||
|
"pyproject.toml:tool.poetry.version",
|
||||||
|
]
|
||||||
|
version_variables = [
|
||||||
|
"auto_seminar/__init__.py:__version__"
|
||||||
|
]
|
||||||
|
build_command_env = []
|
||||||
|
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
|
||||||
|
commit_parser = "angular"
|
||||||
|
logging_use_named_masks = false
|
||||||
|
major_on_zero = true
|
||||||
|
allow_zero_version = true
|
||||||
|
tag_format = "v{version}"
|
||||||
|
|
||||||
|
[tool.semantic_release.branches.main]
|
||||||
|
match = "(main|master)"
|
||||||
|
prerelease_token = "rc"
|
||||||
|
prerelease = false
|
||||||
|
|
||||||
|
[tool.semantic_release.changelog]
|
||||||
|
template_dir = "templates"
|
||||||
|
changelog_file = "CHANGELOG.md"
|
||||||
|
exclude_commit_patterns = []
|
||||||
|
|
||||||
|
[tool.semantic_release.changelog.environment]
|
||||||
|
block_start_string = "{%"
|
||||||
|
block_end_string = "%}"
|
||||||
|
variable_start_string = "{{"
|
||||||
|
variable_end_string = "}}"
|
||||||
|
comment_start_string = "{#"
|
||||||
|
comment_end_string = "#}"
|
||||||
|
trim_blocks = false
|
||||||
|
lstrip_blocks = false
|
||||||
|
newline_sequence = "\n"
|
||||||
|
keep_trailing_newline = false
|
||||||
|
extensions = []
|
||||||
|
autoescape = true
|
||||||
|
|
||||||
|
[tool.semantic_release.commit_author]
|
||||||
|
env = "GIT_COMMIT_AUTHOR"
|
||||||
|
default = "semantic-release <semantic-release>"
|
||||||
|
|
||||||
|
[tool.semantic_release.commit_parser_options]
|
||||||
|
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
|
||||||
|
minor_tags = ["feat"]
|
||||||
|
patch_tags = ["fix", "perf"]
|
||||||
|
default_bump_level = 0
|
||||||
|
|
||||||
|
[tool.semantic_release.remote]
|
||||||
|
name = "origin"
|
||||||
|
type = "github"
|
||||||
|
ignore_token_for_push = false
|
||||||
|
insecure = false
|
||||||
|
|
||||||
|
[tool.semantic_release.publish]
|
||||||
|
dist_glob_patterns = ["dist/*"]
|
||||||
|
upload_to_vcs_release = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user