Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ WWW_LICENSE := $(WWWDIR)/LICENSE
VERSION ?= $(shell sed -n 's/^#define TIMUI_VERSION_STRING "\(.*\)"/\1/p' $(HEADER))
RELEASE_COMMIT ?= $(shell git rev-parse --verify HEAD 2>/dev/null || printf unknown)
RELEASE_DATE ?= $(shell date -u +%Y-%m-%d)
SHA256SUM ?= sha256sum
# The library is a unity build: src/timui.c #includes every src/timui_*.c
# section. Any section edit must rebuild the test binary, examples, and tools,
# so they all depend on the whole section set (not just src/timui.c).
Expand Down Expand Up @@ -148,7 +149,7 @@ endif
# 2. BUILD RULES — help/build · example pattern rule · test & tool binaries · subsystem objects
# ============================================================================

.PHONY: help build test test-san fuzz run www check-www check-www-assets check-refinement-docs check-phase1-5-docs check-hosted-visual-windows check-conpty-evidence-artifacts verify-conpty-evidence amalgamate release release-check fmt check clean goldens vt-test check-no-images check-conpty check-conpty-posix check-conpty-smoke-tool check-conpty-source-order check-conpty-win32-compile check-conpty-win32-smoke-compile check-chat-highlight check-chat-text man install-man check-chat-text-sheenbidi check-radio smoke-radio run-radio check-sqlite-tui run-sqlite-tui smoke-sqlite-tui check-grid check-layout check-tabs check-chart check-syntax run-gallery smoke-gallery check-image-smoke smoke-image-live smoke-image-live-auto smoke-image-live-kitty smoke-image-live-sixel smoke-image-live-iterm2 smoke-image-live-none smoke-conpty-win32 check-irc run-irc smoke-irc
.PHONY: help build test test-san fuzz run www check-www check-www-assets check-release-checksum-tool check-refinement-docs check-phase1-5-docs check-hosted-visual-windows check-conpty-evidence-artifacts verify-conpty-evidence amalgamate release release-check fmt check clean goldens vt-test check-no-images check-conpty check-conpty-posix check-conpty-smoke-tool check-conpty-source-order check-conpty-win32-compile check-conpty-win32-smoke-compile check-chat-highlight check-chat-text man install-man check-chat-text-sheenbidi check-radio smoke-radio run-radio check-sqlite-tui run-sqlite-tui smoke-sqlite-tui check-grid check-layout check-tabs check-chart check-syntax run-gallery smoke-gallery check-image-smoke smoke-image-live smoke-image-live-auto smoke-image-live-kitty smoke-image-live-sixel smoke-image-live-iterm2 smoke-image-live-none smoke-conpty-win32 check-irc run-irc smoke-irc
.PHONY: accept check-vt-gif check-vt-gif-glyphs check-vt-gif-cjk check-vt-gif-emoji check-vt-gif-output check-vt-gif-golden gen-golden-vtgif check-vt-gif-style check-vt-gif-all
.PHONY: run-chat-demo rec-chat-demo gif-chat-demo webp-chat-demo gen-font-ttf gen-emoji gen-cjk

Expand Down Expand Up @@ -311,7 +312,7 @@ rec-chat-demo: $(BLDDIR)/chat ## Screen-record hint, then autoplay the chat demo
# 5. CHECK — unit tests · goldens · acceptance · per-subsystem standalone checks
# ============================================================================

check: build test check-no-images check-conpty-smoke-tool check-conpty-source-order check-conpty-win32-compile check-conpty-win32-smoke-compile check-hosted-visual-windows check-conpty-evidence-artifacts check-www check-refinement-docs check-phase1-5-docs ## Build + test gate
check: build test check-no-images check-conpty-smoke-tool check-conpty-source-order check-conpty-win32-compile check-conpty-win32-smoke-compile check-hosted-visual-windows check-conpty-evidence-artifacts check-www check-release-checksum-tool check-refinement-docs check-phase1-5-docs ## Build + test gate
@printf "$(C_GREEN)✓ check passed$(C_RESET)\n"

test: $(TEST_BIN) ## Compile and run the unit tests
Expand Down Expand Up @@ -350,6 +351,12 @@ check-phase1-5-docs: ## Verify Phase 1.5 evidence docs agree
@grep -Fq -- 'make verify-conpty-evidence ARTIFACT_DIR=' docs/runbooks/phase1-5-live-evidence.md
@printf "$(C_GREEN)✓ Phase 1.5 evidence docs$(C_RESET)\n"

check-release-checksum-tool: ## Verify release packaging uses nix-available checksum tooling
@command -v $(SHA256SUM) >/dev/null || { printf "$(C_YELL)✗ release$(C_RESET) $(SHA256SUM) is required\n"; exit 1; }
@! grep -nE '(^|[^[:alnum:]_])[s]hasum([^[:alnum:]_]|$$)' Makefile docs/runbooks/release.md || { \
printf "$(C_YELL)✗ release$(C_RESET) do not depend on the Perl checksum tool; use sha256sum\n"; exit 1; }
@printf "$(C_GREEN)✓ release checksum tool$(C_RESET)\n"

check-hosted-visual-windows: tools/ci/hosted_visual_windows.ps1 ## Verify hosted Windows probe emits ConPTY acceptance artifacts
@grep -Fq -- 'conpty-acceptance.json' tools/ci/hosted_visual_windows.ps1
@grep -Fq -- 'conpty-smoke.command.txt' tools/ci/hosted_visual_windows.ps1
Expand Down Expand Up @@ -843,7 +850,7 @@ release: amalgamate ## Build ignored versioned release artifacts (VERSION=x.y.z)
printf "archive=timui.tar.gz\n"; \
} > "$$out/MANIFEST"; \
tar -czf "$$out/timui.tar.gz" -C "$(BLDDIR)/release-package" "timui-$(VERSION)"; \
(cd "$$out" && shasum -a 256 timui.h timui.tar.gz MANIFEST > SHA256SUMS)
(cd "$$out" && $(SHA256SUM) timui.h timui.tar.gz MANIFEST > SHA256SUMS)
@printf "$(C_GREEN)✓ wrote $(RELDIR)/releases/$(VERSION)$(C_RESET)\n"

www: amalgamate ## Refresh static website assets under www/
Expand Down Expand Up @@ -898,7 +905,7 @@ release-check: release ## Verify the amalgamated release header and release arti
test -s "$$out/SHA256SUMS"; \
grep -q '^version=$(VERSION)$$' "$$out/MANIFEST"; \
grep -q '^commit=$(RELEASE_COMMIT)$$' "$$out/MANIFEST"; \
(cd "$$out" && shasum -a 256 -c SHA256SUMS >/dev/null)
(cd "$$out" && $(SHA256SUM) -c SHA256SUMS >/dev/null)
@tmp="$(BLDDIR)/release_selftest.d"; rm -rf "$$tmp"; mkdir -p "$$tmp"; \
install -m 0644 $(RELDIR)/timui.h "$$tmp/timui.h"; \
printf '#define TIMUI_IMPLEMENTATION\n#include "timui.h"\nint main(void){return 0;}\n' > "$$tmp/release_selftest.c"; \
Expand Down
2 changes: 1 addition & 1 deletion docs/runbooks/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The generated, ignored release payload is:
- `release/releases/0.2.0/SHA256SUMS`

Verify the manifest records the intended version, commit, and UTC date; verify
`shasum -a 256 -c SHA256SUMS` passes inside the version directory.
`sha256sum -c SHA256SUMS` passes inside the version directory.

## Tag and GitHub release

Expand Down
Loading