Victor Wiebe 187fd34531 v0.7.0: Gantt chart, notebook targeting & profile-wide scope
Single release covering two feature groups (CHANGELOG 0.7.0 + 0.6.0):

- gtd-gantt block: project-grouped timeline of bars (notes with begin/end
  dates) and milestones (to-dos on their due date); dual-role fence,
  swimlanes, month tick header, today line, read-only.
- notebook: targeting across all four view blocks; scope: all for
  profile-wide scans with size guardrails; note body fetched only when the
  inclusion mode actually needs the gtd block.

jest 140/140.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 12:11:45 -04:00

39 lines
1.3 KiB
Bash

#!/usr/bin/env bash
#
# Archive existing publish/*.jpl builds before a new `npm run dist`.
#
# Per CLAUDE.md: never overwrite a previous .jpl. This moves each current
# publish/*.jpl into build-archive/ with a version + timestamp suffix so a
# fresh build can't clobber the last one. No-op when no .jpl is present.
#
# The archive lives at repo root (NOT under publish/) deliberately: webpack's
# buildMain step runs `fs.removeSync(publishDir)` and would wipe an in-publish
# archive, and `package.json` "files": ["publish"] would ship it to npm.
# build-archive/ is git-ignored and outside both.
#
# Wired as the `predist` npm script, so it runs automatically before every
# `npm run dist`. Safe to run manually too.
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
publish_dir="$repo_root/publish"
archive_dir="$repo_root/build-archive"
shopt -s nullglob
jpls=("$publish_dir"/*.jpl)
if [ ${#jpls[@]} -eq 0 ]; then
echo "archive-jpl: no publish/*.jpl to archive."
exit 0
fi
version="$(node -p "require('$repo_root/package.json').version")"
timestamp="$(date +%Y%m%d-%H%M%S)"
mkdir -p "$archive_dir"
for jpl in "${jpls[@]}"; do
base="$(basename "$jpl" .jpl)"
dest="$archive_dir/${base}-${version}-${timestamp}.jpl"
mv "$jpl" "$dest"
echo "archive-jpl: moved $(basename "$jpl") -> build-archive/$(basename "$dest")"
done