docker build makefile. fix image url for readme so it shows up on pypi

pull/224/head
Andrew Mirsky 2025-06-17 10:45:21 -04:00
rodzic 89ccb857ed
commit 33a999ea1f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: A98E67635CDF2C39
3 zmienionych plików z 41 dodań i 6 usunięć

37
Makefile 100644
Wyświetl plik

@ -0,0 +1,37 @@
# Image name and tag
IMAGE_NAME := amqtt
IMAGE_TAG := latest
VERSION_TAG := 0.11.0
REGISTRY := amqtt/$(IMAGE_NAME)
# Platforms to build for
PLATFORMS := linux/amd64,linux/arm64
# Default target
.PHONY: all
all: build
# Build multi-platform image
.PHONY: build
build:
docker buildx build \
--platform $(PLATFORMS) \
--tag $(REGISTRY):$(IMAGE_TAG) \
--tag $(REGISTRY):$(VERSION_TAG) \
--file Dockerfile \
--push .
# Optional: build without pushing (for local testing)
.PHONY: build-local
build-local:
docker buildx build \
--tag $(REGISTRY):$(IMAGE_TAG) \
--tag $(REGISTRY):$(VERSION_TAG) \
--file Dockerfile \
--load .
# Create builder if not exists
.PHONY: init
init:
docker buildx create --use --name multi-builder || true
docker buildx inspect --bootstrap

Wyświetl plik

@ -7,7 +7,7 @@
![Python Wheel](https://img.shields.io/pypi/wheel/amqtt?style=plastic)
[![PyPI](https://img.shields.io/pypi/v/amqtt?style=plastic&logo=python&logoColor=yellow)](https://pypi.org/project/amqtt/)
![docs/assets/amqtt.svg](docs/assets/amqtt.svg)
![docs/assets/amqtt.svg](https://amqtt.readthedocs.io/en/v0.11.0/docs/assets/amqtt.svg)
`aMQTT` is an open source [MQTT](http://www.mqtt.org) broker and client[^1], natively implemented with Python's [asyncio](https://docs.python.org/3/library/asyncio.html).

Wyświetl plik

@ -87,15 +87,13 @@ amqtt_pub = "amqtt.scripts.pub_script:main"
amqtt_sub = "amqtt.scripts.sub_script:main"
[tool.hatch.build.targets.sdist]
include = ["/amqtt"]
include = ["/amqtt", "README.md"]
[tool.hatch.version]
source = "vcs"
[tool.poe.tasks]
rtd = "mkdocs serve -f mkdocs.rtd.yml"
test = "pytest"
docs = "mkdocs build"
[tool.hatch.publish.indexes.testpypi]
url = "https://test.pypi.org/legacy/"
# ___________________________________ PLUGINS __________________________________
[project.entry-points."amqtt.test.plugins"]