-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (32 loc) · 1.03 KB
/
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
36
37
38
##
# Ansible Pot Role
#
# @file
# @version 0.1
.PHONY: galaxy-publish
VERSION = 0.5.34
GALAXY_ARTIFACT := zilti-pot-${VERSION}.tar.gz
README.org zilti/pot/README.org zilti/pot/README.md zilti/pot/galaxy.yml: pot.org
mkdir -p zilti/pot
emacs pot.org --batch --kill \
--eval '(setq org-confirm-babel-evaluate nil)' \
--eval "(require 'ob-tangle)" \
-f org-org-export-to-org \
-f org-md-export-to-markdown \
--eval '(org-babel-tangle-file "pot.org")'
mv pot.org.org README.org
mv pot.md zilti/pot/README.md
git add README.org
git add zilti/pot/README.md
${GALAXY_ARTIFACT}: zilti/pot/galaxy.yml
rm -rf ${GALAXY_ARTIFACT}
ln -sf ../../README.md zilti/pot/roles/pot/README.md
ansible-galaxy collection build zilti/pot/
test:: ${GALAXY_ARTIFACT}
ansible-galaxy collection install -fn ${GALAXY_ARTIFACT}
ansible-playbook -i inventory playbook.yml -vvv
galaxy-api-key = ''
galaxy-publish: ${GALAXY_ARTIFACT} README.org
ansible-galaxy collection publish --api-key '${galaxy-api-key}' ${GALAXY_ARTIFACT}
git add pot.org zilti/pot
# end