diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 096118d..17fda9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,9 +13,9 @@ build: stage: build image: harbor.dataknife.net/dockerhub/library/python:3.14-slim script: - - apt-get update && apt-get install -y --no-install-recommends git build-essential + - apt-get update && apt-get install -y --no-install-recommends make git build-essential - pip install --upgrade pip build - - python -m build + - make build artifacts: paths: - dist/ diff --git a/Makefile b/Makefile index cfd1d07..b58bede 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install dev test lint format clean docker-build docker-login docker-push docker-pull docker-run run check check-all commit-changes release venv +.PHONY: help install dev test lint format clean build docker-build docker-login docker-push docker-pull docker-run run check check-all commit-changes release venv # Force use of bash shell (required for make to work properly with line continuations) SHELL := /bin/bash @@ -67,6 +67,10 @@ format: $(BLACK) src tests $(RUFF) check --fix src tests +build: clean + pip install --upgrade pip build + python -m build + clean: find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true find . -type f -name "*.pyc" -delete