diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1769342..f890b82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,9 +7,9 @@ variables: build: stage: build - image: golang:1.23-alpine + image: harbor.dataknife.net/dockerhub/library/golang:1.23-alpine script: - - apk add --no-cache make git + - apk add --no-cache make git bash - make build artifacts: paths: diff --git a/Makefile b/Makefile index f0ef042..45e0713 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install dev test lint format clean docker-build docker-run docs run venv check all check-all commit-changes release +.PHONY: help install dev test lint format clean build docker-build docker-run docs run venv check all check-all commit-changes release # Force use of bash shell (required for make to work properly with line continuations) SHELL := /bin/bash @@ -25,6 +25,7 @@ help: @echo " test-fast Run tests without coverage" @echo " lint Run linters (ruff, mypy)" @echo " format Format code with black and ruff" + @echo " build Build Python package (creates dist/)" @echo " clean Remove build artifacts and cache files" @echo " docker-build Build Docker image" @echo " docker-login Login to Harbor registry (requires HARBOR_USERNAME and HARBOR_PASSWORD)" @@ -69,6 +70,10 @@ format: $(BLACK) highcommand tests $(RUFF) check --fix . +build: clean + pip install --upgrade pip build + python -m build + clean: find . -type d -name __pycache__ -exec rm -rf {} + find . -type f -name "*.pyc" -delete