Skip to content

Commit f667598

Browse files
chore(config): add convcommit config and update Makefile and gitignore
1 parent c2c5520 commit f667598

File tree

3 files changed

+99
-13
lines changed

3 files changed

+99
-13
lines changed

.convcommit

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# convcommit - Conventional Commit message builder
2+
# This file is read by the `convcommit` CLI tool to populate
3+
# the interactive selector menus.
4+
# Commit this file to share the project's commit vocabulary with the team.
5+
#
6+
# FORMAT
7+
# type:<value> — commit type option (e.g. fix, feat, docs)
8+
# scope:<value> — commit scope option
9+
# message:<value> — commit message template
10+
#
11+
# SPECIAL PREFIXES
12+
# ~<value> — marks the default selection
13+
# _ — enables free-text manual input (press ".")
14+
# [X]<value> — forces key letter X for this entry (e.g. [B]build, [W]wip)
15+
#
16+
# HOW TO USE (interactive)
17+
# Run `convcommit` in a git repo. A menu appears for type, scope, message.
18+
# Press the letter in brackets [A][B]... or [.] for free-text input.
19+
# Stage and push in one shot:
20+
# convcommit -a -p
21+
#
22+
# HOW TO USE (direct flags — scripts, AI agents)
23+
# Bypass the selector entirely with explicit flags:
24+
# convcommit --type fix --scope auth --message "fix null pointer" --push
25+
# convcommit -t feat -s api -m "add endpoint" -a -p
26+
#
27+
# SMART PATTERN — stage specific files and commit in one command
28+
# Use --add instead of nested command substitution.
29+
# Anti-pattern (avoid):
30+
# msg=$(convcommit --type fix --message "fix") && git commit -m "$msg" && git push
31+
# Recommended:
32+
# convcommit --add src/auth.sh --type fix --scope auth --message "fix null pointer" --push
33+
# Stage multiple files:
34+
# convcommit --add src/auth.sh --add tests/auth_test.sh -t test -s auth -m "add tests" -p
35+
#
36+
# HOW TO USE (pipe / non-interactive)
37+
# Pipe selections as lines: one per stage (type, scope, message).
38+
# Use the letter shown in the menu, or "." to trigger free-text input.
39+
# Examples:
40+
# printf "G\n.\nfix null pointer in login\n" | convcommit
41+
# printf "F\n\nadd endpoint\n" | convcommit -a -p
42+
# Capture just the formatted message:
43+
# msg=$(printf "G\n\nfix null pointer\n" | convcommit)
44+
#
45+
# OTHER USEFUL FLAGS
46+
# --reset Regenerate this file with the latest defaults
47+
# --help Show all options
48+
#
49+
# INSTALLATION
50+
# convcommit is a single bash file with no dependencies.
51+
# Install it locally in your project:
52+
# curl -fsSL https://raw.githubusercontent.com/francescobianco/convcommit/refs/heads/main/bin/convcommit \
53+
# -o bin/convcommit && chmod +x bin/convcommit
54+
# Or system-wide:
55+
# curl -fsSL https://raw.githubusercontent.com/francescobianco/convcommit/refs/heads/main/bin/convcommit \
56+
# -o /usr/local/bin/convcommit && chmod +x /usr/local/bin/convcommit
57+
type:[B]build
58+
type:~chore
59+
type:[D]docs
60+
type:deps
61+
type:feat
62+
type:fix
63+
type:ci
64+
type:init
65+
type:merge
66+
type:perf
67+
type:refactor
68+
type:revert
69+
type:security
70+
type:style
71+
type:test
72+
type:[W]wip
73+
scope:_
74+
scope:~
75+
message:_
76+
message:~_

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ share/python-wheels/
3030
*.egg
3131
MANIFEST
3232

33+
3334
# PyInstaller
3435
# Usually these files are written by a python script from a template
3536
# before PyInstaller builds the exe, so as to inject date/other infos into it.

Makefile

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@
1414
# #
1515
# ═══════════════════════════════════════════════════════════════════════ #
1616
# #
17-
# Project: openapi-rust-sdk #
18-
# Version: 0.1.0 #
17+
# Project: openapi-python-sdk #
1918
# Author: Michael Cuffaro (@maiku1008) #
2019
# Copyright: (c) 2025 Openapi®. All rights reserved. #
2120
# License: MIT #
2221
# Maintainer: Francesco Bianco #
2322
# Contact: https://openapi.com/ #
24-
# Repository: https://github.com/openapi/openapi-php-sdk/ #
23+
# Repository: https://github.com/openapi-it/openapi-python-sdk/ #
2524
# Documentation: https://console.openapi.com/ #
2625
# #
2726
# ═══════════════════════════════════════════════════════════════════════ #
@@ -35,7 +34,8 @@
3534
## Variables
3635
## =========
3736

38-
VERSION := 1.2.1
37+
export PATH := $(HOME)/.local/bin:$(PATH)
38+
VERSION := $(shell grep '^version' pyproject.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
3939

4040
## ====================
4141
## Development Commands
@@ -51,13 +51,22 @@ dev-push:
5151
## Release Commands
5252
## ================
5353

54-
push:
55-
@git add .
56-
@git commit -am "Updated at $$(date)" || true
57-
@git push
54+
.PHONY: setup build publish release
5855

59-
release: push
60-
@git add .
61-
@git commit -m "Update PHP SDK to version ${VERSION}" || echo "No changes to commit"
62-
@git tag -fa "${VERSION}" -m "${VERSION}"
63-
@git push origin --tags -f
56+
setup:
57+
@poetry --version > /dev/null 2>&1 || \
58+
(echo "Installing Poetry..." && curl -sSL https://install.python-poetry.org | python3 -)
59+
60+
build: setup
61+
@echo "Building version $(VERSION)..."
62+
@poetry build
63+
64+
publish: build
65+
@echo "Publishing version $(VERSION) to PyPI..."
66+
@poetry publish
67+
68+
release: publish
69+
@echo "Tagging release $(VERSION)..."
70+
@git tag -fa "$(VERSION)" -m "Release $(VERSION)"
71+
@git push origin --tags -f
72+
@echo "Released $(VERSION) successfully."

0 commit comments

Comments
 (0)