Makefile 996 B

1234567891011121314151617181920212223242526272829
  1. test:
  2. python3 -m unittest discover -s tests -v
  3. TMP_PCI_IDS = /tmp/ocboot-pci.ids
  4. DEST_PCI_IDS = $(CURDIR)/onecloud/roles/utils/gpu-init/files/pci.ids
  5. OLD_VERSION?=
  6. update-pciids:
  7. curl -o $(TMP_PCI_IDS) http://pci-ids.ucw.cz/v2.2/pci.ids && \
  8. mv $(TMP_PCI_IDS) $(DEST_PCI_IDS)
  9. .PHONY: test
  10. REGISTRY ?= "registry.cn-beijing.aliyuncs.com/yunionio"
  11. VERSION ?= v4-k3s.4
  12. image:
  13. docker buildx build --platform linux/arm64,linux/amd64 --push \
  14. -t $(REGISTRY)/ocboot:$(VERSION) -f ./Dockerfile .
  15. generate-docker-compose-manifests:
  16. VERSION=$(VERSION) python3 ./generate-compose.py > ./compose/docker-compose.yml
  17. @if [ -n "$(OLD_VERSION)" ] && [ -n "$(VERSION)" ]; then \
  18. perl -pi -e "s#$(OLD_VERSION)#$(VERSION)#" $$(find . -type f \( -iname \*.py -o -iname \*.yaml -o -iname \*.sh -o -iname VERSION \) ! -path "./.git/*" ); \
  19. fi
  20. generate-baremetal-compose-manifests:
  21. VERSION=$(VERSION) PRODUCT_VERSION=Baremetal \
  22. python3 ./generate-compose.py > compose/baremetal/docker-compose.yml