-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (29 loc) · 932 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SHELL := bash
CURRENT_DIR = $(shell pwd)
ENV_FILE := $(CURRENT_DIR)/.envrc
POETRY_COMMAND := $(shell which poetry)
GALAXY_VERSION := $(shell yq eval '.version' $(CURRENT_DIR)/galaxy.yml)
RELEASE_ARTIFACT := "$(DIST_DIR)/kameshsampath-kubernetes_spices-$(GALAXY_VERSION).tar.gz"
create-venv:
@$(POETRY_COMMAND) install
shell-env:
@$(POETRY_COMMAND) shell
lint:
@ansible-lint --force-color
direnv allow $(ENV_FILE)
build_collection:
direnv allow $(ENV_FILE)
@$(POETRY_COMMAND) run ansible-galaxy collection build \
--out $(DIST_DIR) \
--force \
$(EXTRA_ARGS)
publish_collection:
direnv allow $(ENV_FILE)
@ $(POETRY_COMMAND) run ansible-galaxy collection publish \
--server $(ANSIBLE_GALAXY_SERVER_RELEASE_SERVER) \
--token $(ANSIBLE_GALAXY_SERVER_RELEASE_GALAXY_TOKEN) \
$(RELEASE_ARTIFACT)
$(EXTRA_ARGS)
test:
direnv allow $(ENV_FILE)
@$(POETRY_COMMAND) run ansible-playbook test.yml $(EXTRA_ARGS)