forked from canonical/packer-maas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
725 additions
and
461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ __pycache__ | |
*.orig | ||
output-qemu | ||
packer_cache | ||
.ve | ||
*~ | ||
\#*\# | ||
.#* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
PACKER ?= packer | ||
ISO ?= ${VMWARE_ESXI_ISO_PATH} | ||
VENV := .ve | ||
|
||
.PHONY: all clean | ||
.PHONY: all lint format clean | ||
|
||
all: vmware-esxi.dd.gz | ||
|
||
vmware-esxi.dd.gz: clean | ||
sudo PACKER_LOG=1 ${PACKER} build -var "vmware_esxi_iso_path=${ISO}" vmware-esxi.json | ||
reset | ||
|
||
$(VENV): requirements-dev.txt requirements.txt | ||
python3 -m venv --system-site-packages --clear $@ | ||
$(VENV)/bin/pip install $(foreach r,$^,-r $(r)) | ||
|
||
lint: $(VENV) | ||
$(eval py_files := $(shell grep -R -m1 -l '#!/usr/bin/env python' maas/ curtin/)) | ||
$(VENV)/bin/isort --check-only --diff $(py_files) | ||
$(VENV)/bin/black --check $(py_files) | ||
$(VENV)/bin/flake8 --ignore E203,W503 $(py_files) | ||
|
||
format: $(VENV) | ||
$(eval py_files := $(shell grep -R -m1 -l '#!/usr/bin/env python' maas/ curtin/)) | ||
$(VENV)/bin/isort $(py_files) | ||
$(VENV)/bin/black -q $(py_files) | ||
|
||
clean: | ||
sudo ${RM} -rf output-qemu vmware-esxi.dd.gz | ||
sudo ${RM} -rf output-qemu vmware-esxi.dd.gz $(VENV) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.