Files
AutistMask/Makefile
user be38ce081e
All checks were successful
check / check (push) Successful in 45s
refactor: derive git info inside Docker instead of --build-arg
- Remove .git from .dockerignore so it's available in Docker build context
- Install git in Docker image (apt-get)
- Remove ARG/ENV GIT_COMMIT_SHORT/FULL from Dockerfile
- Remove --build-arg from Makefile docker target
- Simplify build.js to use git CLI directly (no env var indirection)

build.js already had fallback logic to shell out to git; now that .git
is present in the build context, it works directly without needing
values passed in from outside Docker.
2026-03-01 15:16:16 -08:00

46 lines
843 B
Makefile

.PHONY: install test lint fmt fmt-check check docker hooks build clean dev
install:
@yarn install
test:
@echo "Running tests..."
@timeout 30 yarn run test 2>&1
lint:
@echo "Linting..."
@yarn run lint 2>&1
fmt:
@echo "Formatting..."
@yarn run fmt 2>&1
fmt-check:
@echo "Checking formatting..."
@yarn run fmt-check 2>&1
check: test lint fmt-check
build:
@echo "Building extension..."
@yarn run build 2>&1
clean:
@rm -rf dist/
dev:
@echo "Building in watch mode..."
@yarn run build --watch 2>&1
docker:
@docker build -t autistmask .
hooks:
@echo "Installing pre-commit hook..."
@mkdir -p .git/hooks
@echo '#!/usr/bin/env bash' > .git/hooks/pre-commit
@echo 'set -euo pipefail' >> .git/hooks/pre-commit
@echo 'make check' >> .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Pre-commit hook installed."