Keep configs in ~/.config/build-release/ and tool state in ~/.local/state/build-release/, under XDG_* where set
CI / tests (pull_request) Successful in 6m34s
CI / tests (pull_request) Successful in 6m34s
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
usage: compress-archives
|
||||
|
||||
It gzips each file that last changed over 30 days ago: in build-release's archive,
|
||||
$BUILD_RELEASE_TRANSCRIPTS (default ~/.claude/loop-claude-transcripts), each transcript, *.jsonl;
|
||||
in the review folders, ~/.local/state/larv-review, every file but a lock, *.lock. A file's last change is the later
|
||||
$BUILD_RELEASE_TRANSCRIPTS (default ~/.local/state/build-release/transcripts), each transcript, *.jsonl;
|
||||
in the review folders, ~/.local/state/build-release/larv-review, every file but a lock, *.lock. A file's last change is the later
|
||||
of its mtime and ctime, so a copied or unpacked file counts from when it landed.
|
||||
|
||||
The gzip lands beside the file as <name>.gz, with the same times. The file is removed only once
|
||||
@@ -21,7 +21,7 @@ import typing
|
||||
|
||||
from transcript_archive.location import archive_root
|
||||
from failure import Failure
|
||||
from review_rules.review_folder import REPORTS
|
||||
from review_rules.review_folder import reports_folder
|
||||
from text_files.compressed import SUFFIX
|
||||
|
||||
# Why 30 days: docs/decisions.md → `archives: gzip each transcript in build-release's archive and each file in the review folders 30 days after it last changed, keeping all of them`.
|
||||
@@ -37,7 +37,7 @@ def main(argv: list[str], env: typing.Mapping[str, str], home: pathlib.Path, now
|
||||
return 1
|
||||
cutoff = now() - AGE_DAYS * 24 * 60 * 60
|
||||
count = 0
|
||||
for path in [*old_files(archive_root(home, env), "*.jsonl", cutoff), *old_files(home / REPORTS, "*", cutoff)]:
|
||||
for path in [*old_files(archive_root(home, env), "*.jsonl", cutoff), *old_files(reports_folder(home, env), "*", cutoff)]:
|
||||
if failed := compress(path):
|
||||
print(failed.reason, file=sys.stderr)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user