scripts/docker/slim.sh survived the removal of the stage that copied and ran it, and nothing else referenced it. The README still offered a `Virgin` image type with `pkgmgr-arch-virgin` as its example, which is no longer published. Its second row was wrong independently of that refactor: the image does not contain Nix, it runs `make install`, which is scripts/installation/init.sh, and neither that nor entry.sh installs it. The section now states the tags compute_publish_tags() actually pushes, including the unsuffixed alias the default distribution gets, and points at base-images for the clean environment the virgin image used to serve. A missing blank line before a horizontal rule had also been rendering the paragraph above it as a heading. Three comment blocks explained what the repository used to do rather than what it does, in the Dockerfile, in scripts/build/publish.sh and in the Makefile. That belongs in the history, which is where it already is. Verified: markdownlint-cli2 on the README goes from 21 findings to 10, all remaining ones pre-existing and outside this section; `bash -n` on publish.sh and `make -n build` pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
109 lines
3.1 KiB
Makefile
109 lines
3.1 KiB
Makefile
.PHONY: install uninstall \
|
|
build build-no-cache build-no-cache-all build-missing \
|
|
delete-volumes purge \
|
|
test test-unit test-e2e test-integration test-env-virtual test-env-nix \
|
|
lint \
|
|
setup setup-venv setup-nix
|
|
|
|
# Distro
|
|
# Options: arch debian ubuntu fedora centos
|
|
DISTROS ?= arch debian ubuntu fedora centos
|
|
PKGMGR_DISTRO ?= arch
|
|
export PKGMGR_DISTRO
|
|
|
|
# Nix Config Variable (To avoid rate limit)
|
|
NIX_CONFIG ?=
|
|
export NIX_CONFIG
|
|
|
|
# ------------------------------------------------------------
|
|
# Base images
|
|
# ------------------------------------------------------------
|
|
BASE_IMAGES_TAG ?= latest
|
|
export BASE_IMAGES_TAG
|
|
|
|
# PYthon Unittest Pattern
|
|
TEST_PATTERN := test_*.py
|
|
export TEST_PATTERN
|
|
export PYTHONPATH := src
|
|
|
|
# ------------------------------------------------------------
|
|
# System install
|
|
# ------------------------------------------------------------
|
|
install:
|
|
@echo "Building and installing distro-native package-manager for this system..."
|
|
@bash scripts/installation/init.sh
|
|
|
|
# ------------------------------------------------------------
|
|
# PKGMGR setup
|
|
# ------------------------------------------------------------
|
|
|
|
# Default: keep current auto-detection behavior
|
|
setup: setup-venv
|
|
|
|
# Explicit: developer setup (Python venv + shell RC + install)
|
|
setup-venv: setup-nix
|
|
@bash scripts/setup/venv.sh
|
|
|
|
# Explicit: Nix shell mode (no venv, no RC changes)
|
|
setup-nix:
|
|
@bash scripts/setup/nix.sh
|
|
|
|
# ------------------------------------------------------------
|
|
# Docker build targets (delegated to scripts/build)
|
|
# ------------------------------------------------------------
|
|
build:
|
|
@bash scripts/build/image.sh
|
|
|
|
build-missing:
|
|
@bash scripts/build/image.sh --missing
|
|
|
|
build-no-cache:
|
|
@bash scripts/build/image.sh --no-cache
|
|
|
|
build-no-cache-all:
|
|
@set -e; \
|
|
for d in $(DISTROS); do \
|
|
echo "=== build-no-cache: $$d ==="; \
|
|
PKGMGR_DISTRO="$$d" $(MAKE) build-no-cache; \
|
|
done
|
|
|
|
# ------------------------------------------------------------
|
|
# Lint targets (run on the host, not in a container)
|
|
# ------------------------------------------------------------
|
|
|
|
lint:
|
|
@bash scripts/lint/python.sh
|
|
|
|
# ------------------------------------------------------------
|
|
# Test targets (delegated to scripts/test)
|
|
# ------------------------------------------------------------
|
|
|
|
test-unit: build-missing
|
|
@bash scripts/test/test-unit.sh
|
|
|
|
test-integration: build-missing
|
|
@bash scripts/test/test-integration.sh
|
|
|
|
test-e2e: build-missing
|
|
@bash scripts/test/test-e2e.sh
|
|
|
|
test-env-virtual: build-missing
|
|
@bash scripts/test/test-env-virtual.sh
|
|
|
|
test-env-nix: build-missing
|
|
@bash scripts/test/test-env-nix.sh
|
|
|
|
# Combined test target for local + CI (lint + unit + integration + e2e)
|
|
test: lint test-env-virtual test-unit test-integration test-e2e
|
|
|
|
delete-volumes:
|
|
@docker volume rm "pkgmgr_nix_store_${PKGMGR_DISTRO}" "pkgmgr_nix_cache_${PKGMGR_DISTRO}" || echo "No volumes to delete."
|
|
|
|
purge: delete-volumes build-no-cache
|
|
|
|
# ------------------------------------------------------------
|
|
# Uninstall target
|
|
# ------------------------------------------------------------
|
|
uninstall:
|
|
@bash scripts/uninstall.sh
|