GRM-51: refactor: convert shell scripts and inline workflow scripts to Python
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: all setup install update lint ansible-lint makefile-lint lint-all test test-unit pytest-cov molecule molecule-all test-all clean workflow-lint workflow-dryrun workflow-check
|
||||
.PHONY: all setup install update lint ansible-lint makefile-lint lint-all test test-unit pytest-cov molecule molecule-all test-all clean workflow-lint workflow-dryrun workflow-check install-tools
|
||||
|
||||
PYTHON := python3
|
||||
VENV := .venv
|
||||
@@ -7,8 +7,8 @@ CHECKMAKE := $(shell command -v checkmake 2>/dev/null || echo $(HOME)/go/bin/che
|
||||
|
||||
all: setup
|
||||
|
||||
setup: $(VENV)/bin/activate .env activate-scripts checkmake
|
||||
@bash scripts/setup.sh "$(BIN)"
|
||||
setup: $(VENV)/bin/activate .env activate-scripts checkmake install-tools
|
||||
@$(PYTHON) scripts/setup.py --bin "$(BIN)"
|
||||
|
||||
.env:
|
||||
@if [ ! -f .env ]; then \
|
||||
@@ -34,6 +34,9 @@ install-hooks:
|
||||
checkmake:
|
||||
@python3 scripts/install_checkmake.py
|
||||
|
||||
install-tools:
|
||||
@$(PYTHON) scripts/install_tools.py
|
||||
|
||||
install:
|
||||
@if [ -z "$(HOST)" ]; then echo "HOST is required. Example: make install HOST=192.168.1.10"; exit 1; fi
|
||||
$(BIN)/grm install $(HOST) $(if $(USER),--user $(USER),) $(if $(KEY),--key $(KEY),) $(if $(NAME),--name $(NAME),) $(if $(TOKEN),--token $(TOKEN),) $(if $(ASK_BECOME_PASS),--ask-become-pass,)
|
||||
@@ -121,7 +124,7 @@ molecule:
|
||||
|
||||
# All scenarios on all supported platforms (sequential; use CI matrix for parallel execution)
|
||||
molecule-all:
|
||||
@bash scripts/molecule_all.sh
|
||||
@$(PYTHON) scripts/molecule_all.py --bin "$(BIN)"
|
||||
|
||||
test: test-all
|
||||
|
||||
|
||||
Reference in New Issue
Block a user