Skip to content

Commit 932235f

Browse files
committed
Update release process
1 parent a5afb79 commit 932235f

8 files changed

Lines changed: 29 additions & 11 deletions

File tree

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"id": "ai-prompt-auto-commit",
88
"type": "command",
99
"command": "input=$(cat); ts=$(date +%Y-%m-%dT%H-%M-%S); model=$(printf '%s' \"$input\" | jq -r '.model // \"claude-sonnet-4-6\"'); root=$(git rev-parse --show-toplevel 2>/dev/null || pwd); mkdir -p \"$root/.prompts\"; printf '%s' \"$input\" | jq -r '.prompt' > \"$root/.prompts/${ts}_${model}.txt\"",
10-
"version": "0.0.7"
10+
"version": "0.0.9"
1111
}
1212
]
1313
}

.github/assistant-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
version: "0.0.8"
2+
version: "0.0.9"
33
---
44

55

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
## v0.0.9
66

77
- fix: ensure newline before automatically added gitignore entry
8+
- fix: spelling in assistant guidelines
89
- dev: use `tox` for testing.
910
- dev: format code
10-
- fix: spelling in assistant guidelines
11+
- dev: update release process
1112

1213
## v0.0.8
1314

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ default_install_hook_types: [pre-commit, prepare-commit-msg, post-commit]
4242

4343
repos:
4444
- repo: https://github.com/pycalendar/ai-prompt-auto-commit
45-
rev: v0.0.8
45+
rev: v0.0.9
4646
hooks:
4747
- id: prepare-ai-repository
4848
- id: unstage-ai-prompts

ai_prompt_auto_commit/data/assistant-guidelines.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
version: "0.0.7"
2+
version: "0.0.9"
33
---
44

55

6+
67
# Assistant Guidelines for `.prompts` Storage
78

89
These guidelines tell the assistant exactly how to write prompt files in this repository.
@@ -33,7 +34,7 @@ These guidelines tell the assistant exactly how to write prompt files in this re
3334
- For a fresh clone, use this file as the canonical instruction source.
3435
- If the user asks to store new prompts, then assure there is one file for each and all of the uncommitted prompts of that session.
3536
- Read the latest prompt file and find the prompts in your memory. Then store all prompts that came after this.
36-
- Use this commands to find the latest prompt file:
37+
- Use the following command to find the latest prompt file:
3738

3839
```shell
3940
(find .prompts -maxdepth 1 -type f -printf '%f\n'; find .prompts/committed/ -maxdepth 1 -type f -printf '%f\n' ) | sort

ai_prompt_auto_commit/data/claude_settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"id": "ai-prompt-auto-commit",
88
"type": "command",
99
"command": "input=$(cat); ts=$(date +%Y-%m-%dT%H-%M-%S); model=$(printf '%s' \"$input\" | jq -r '.model // \"claude-sonnet-4-6\"'); root=$(git rev-parse --show-toplevel 2>/dev/null || pwd); mkdir -p \"$root/.prompts\"; printf '%s' \"$input\" | jq -r '.prompt' > \"$root/.prompts/${ts}_${model}.txt\"",
10-
"version": "0.0.7"
10+
"version": "0.0.9"
1111
}
1212
]
1313
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ai-prompt-auto-commit"
7-
version = "0.0.8"
7+
version = "0.0.9"
88
description = "Records AI prompts in git commit messages"
99
readme = "README.md"
1010
license = { file = "LICENSE" }

release

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ from pathlib import Path
99

1010
ROOT = Path(__file__).parent
1111
DATA = ROOT / "ai_prompt_auto_commit" / "data"
12+
CLAUDE_SETTINGS = ROOT / ".claude" / "settings.json"
13+
ASSISTANT_GUIDELINES = ROOT / ".github" / "assistant-guidelines.md"
1214

1315
def die(msg: str) -> None:
1416
print(f"error: {msg}", file=sys.stderr)
@@ -60,6 +62,20 @@ def main() -> None:
6062
f"rev: v{version}",
6163
)
6264

65+
# data files
66+
# claude_settings.json - "version": "0.0.8"
67+
replace_in_file(
68+
CLAUDE_SETTINGS,
69+
r'"version"\s*:\s*"[\d.]+"',
70+
f"\"version\": \"{version}\"",
71+
)
72+
# assistant-guidelines.md - version: "0.0.8"
73+
replace_in_file(
74+
ASSISTANT_GUIDELINES,
75+
r"version: \"[\d.]+\"",
76+
f"version: \"{version}\"",
77+
)
78+
6379
# CHANGES.md — insert new version heading only if not already present
6480
changes = ROOT / "CHANGES.md"
6581
text = changes.read_text(encoding="utf-8")
@@ -72,11 +88,11 @@ def main() -> None:
7288
print(f" CHANGES.md: inserted v{version} section")
7389
else:
7490
print(f" CHANGES.md: v{version} already present, skipping")
75-
91+
7692
# copy data files
7793
print(" Updating bundled data files...")
78-
shutil.copyfile(ROOT / ".claude" / "settings.json", DATA / "claude_settings.json")
79-
shutil.copyfile(ROOT / ".github" / "assistant-guidelines.md", DATA / "assistant-guidelines.md")
94+
shutil.copyfile(CLAUDE_SETTINGS, DATA / "claude_settings.json")
95+
shutil.copyfile(ASSISTANT_GUIDELINES, DATA / "assistant-guidelines.md")
8096

8197
# tag and push only when the working tree is clean
8298
status = subprocess.run(

0 commit comments

Comments
 (0)