-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
80 lines (69 loc) · 2.88 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ============================================================================
# Based on page: https://gist.github.com/prwhite/8168133
#
# Example of self-documented makefile
#
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
# ============================================================================
##
## General
##
################################################################################
# Help target
################################################################################
# TODO: For now this is displaying '^' charater between target and description
help:: ## Help: Show this help text
@gawk -vG=$$(tput setaf 2) -vR=$$(tput sgr0) ' \
match($$0, "^(([^#:]*[^ :]) *:)?([^#]*)##([^#].+|)$$",a) { \
if (a[2] != "") { printf " make %s%-30s%s %s\n", G, a[2], R, a[4]; next } \
if (a[3] == "") { print a[4]; next } \
printf "\n%-36s %s\n","",a[4] \
}' $(MAKEFILE_LIST)
@echo "" # blank line at the end
.DEFAULT_GOAL := help
.PHONY: bump-version-patch
bump-version-patch: ## Bump version - patch level
bumpversion patch --verbose
.PHONY: python3-create-venv
python3-create-venv: ## Create python venv and install PIP packages
scripts/create-python3-venv.sh
##
## Goss - release versions
##
GOSS_VERSION_TO_CHECK := 0.4.9
.PHONY: goss-check-releases-versions
goss-check-releases-versions: ## Check the latest goss releases versions
@echo ""
@echo "Checking implemented versions in 'defaults/main.yml'"
@grep -E "^goss_(version|sha256sum)" defaults/main.yml
@echo ""
@echo "Checking the latest goss releases versions (GH CLI)"
@gh release list -R github.com/goss-org/goss
.PHONY: goss-download-release
goss-download-release: ## Download goss release
@echo "Downloading goss release v$(GOSS_VERSION_TO_CHECK)"
wget -c -o tmp/goss-linux-amd64.log -O tmp/goss-linux-amd64 \
https://github.com/goss-org/goss/releases/download/v$(GOSS_VERSION_TO_CHECK)/goss-linux-amd64
wget -c -o tmp/goss-linux-amd64.sha256.log -O tmp/goss-linux-amd64.sha256 \
https://github.com/goss-org/goss/releases/download/v$(GOSS_VERSION_TO_CHECK)/goss-linux-amd64.sha256
.PHONY: goss-verify-release-sha256sum
goss-verify-release-sha256sum: ## Verify sha256 sum for goss release
@echo "Checking goss release sha256sum"
@cd tmp && sha256sum -c goss-linux-amd64.sha256
.PHONY: goss-clean-release-files
goss-clean-release-files: ## Clean goss release files
@echo "Cleaning goss release"
rm -vf tmp/goss-linux-amd64*
##
## Testing ansible role
##
.PHONY: testing-installation
testing-installation: ## Testing installation ansible role running on vagrant
@echo ""
@echo "For testing please navigate to 'tests' folders and run"
@echo ""
@echo " make - for general help"
@echo " make vagrant-up-prepare - Prepare vagrant"
@echo " make test-all-afer-build-and-deploy - Prepare vagrant"
@echo ""