@@ -22,6 +22,64 @@ HELM_TOOL_VERSIONS?=$(PWD)/.tool-versions
22
22
HELM_ENV? =${PWD}/.env
23
23
24
24
25
+ # #@ Misc stuff
26
+
27
+ .PHONY : help
28
+ help : # # this
29
+ @echo " +---------------------------------------------------------------+"
30
+ @echo " | ____ _ ____ _ |"
31
+ @echo " | | _ \ | | | _ \ | | |"
32
+ @echo " | | |_) | __ _ ___| |__ | |_) | ___ | |_ |"
33
+ @echo " | | _ < / _' / __| '_ \| _ < / _ \| __| |"
34
+ @echo " | | |_) | (_| \__ \ | | | |_) | (_) | |_ |"
35
+ @echo " | |____/ \__,_|___/_| |_|____/ \___/ \__| |"
36
+ @echo " | |"
37
+ @echo " | makefile targets |"
38
+ @echo " +---------------------------------------------------------------+"
39
+ @echo " $( VERSION) "
40
+ @awk ' BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST )
41
+
42
+ .PHONY : version
43
+ version : # # get the current helm chart version
44
+ @yq e ' .version' charts/bashbot/Chart.yaml
45
+
46
+ .PHONY : bump-patch
47
+ bump-patch : # # Bump-patch the semantic version of the helm chart using semver tool
48
+ sed -i ' s/' $(shell make version) ' /v' $(shell semver bump patch $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
49
+
50
+ .PHONY : bump-minor
51
+ bump-minor : # # Bump-minor the semantic version of the helm chart using semver tool
52
+ sed -i ' s/' $(shell make version) ' /v' $(shell semver bump minor $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
53
+
54
+ .PHONY : bump-major
55
+ bump-major : # # Bump-major the semantic version of the helm chart using semver tool
56
+ sed -i ' s/' $(shell make version) ' /v' $(shell semver bump major $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
57
+
58
+ .PHONY : install-latest
59
+ install-latest : # # install the latest version of the bashbot binary to /usr/local/bin/bashbot with wget
60
+ wget -q -O /usr/local/bin/bashbot https://github.com/mathew-fleisch/bashbot/releases/download/$(LATEST_VERSION ) /bashbot-$(GOOS ) -$(GOARCH )
61
+ chmod +x /usr/local/bin/bashbot
62
+ ifeq ($(shell uname -s) ,Darwin)
63
+ @echo "To add bashbot to an allowlist:"
64
+ @echo "xattr -d com.apple.quarantine /usr/local/bin/bashbot"
65
+ endif
66
+ bashbot version
67
+ @echo "Run 'bashbot --help' for more information"
68
+
69
+ .PHONY : update-asdf-deps
70
+ update-asdf-deps : # # trigger github action to update asdf dependencies listed in .tool-versions (requires GIT_TOKEN)
71
+ @curl -s -H " Accept: application/vnd.github.everest-preview+json" \
72
+ -H " Authorization: token $( GIT_TOKEN) " \
73
+ --request POST \
74
+ --data ' {"event_type": "trigger-asdf-update"}' \
75
+ https://api.github.com/repos/mathew-fleisch/bashbot/dispatches
76
+ @echo " Updating asdf dependencies via github-action: https://github.com/mathew-fleisch/bashbot/actions/workflows/update-asdf-versions.yaml"
77
+
78
+ .PHONY : gif
79
+ gif : # # Create a gif from a quicktime screen recording that has been exported to .mp4 from imovie
80
+ @echo " Generating gif"
81
+ @ffmpeg -i examples/$(example ) /$(example ) .mp4 -r 10 -pix_fmt rgb24 examples/$(example ) /$(example ) .gif
82
+
25
83
# #@ Go stuff
26
84
27
85
.PHONY : go-build
@@ -127,21 +185,6 @@ kind-setup: docker-build ## setup a KinD cluster to test bashbot's helm chart
127
185
kind-cleanup : # # delete any KinD cluster set up for bashbot
128
186
kind delete cluster
129
187
130
- .PHONY : version
131
- version : # # get the current helm chart version
132
- @yq e ' .version' charts/bashbot/Chart.yaml
133
-
134
- .PHONY : helm-bump-patch
135
- helm-bump-patch : # # Bump-patch the semantic version of the helm chart using semver tool
136
- sed -i ' s/' $(shell make version) ' /v' $(shell semver bump patch $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
137
-
138
- .PHONY : helm-bump-minor
139
- helm-bump-minor : # # Bump-minor the semantic version of the helm chart using semver tool
140
- sed -i ' s/' $(shell make version) ' /v' $(shell semver bump minor $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
141
-
142
- .PHONY : helm-bump-major
143
- helm-bump-major : # # Bump-major the semantic version of the helm chart using semver tool
144
- sed -i ' s/' $(shell make version) ' /v' $(shell semver bump major $(shell make version) ) ' /g' charts/bashbot/Chart.yaml
145
188
146
189
.PHONY : helm-install
147
190
helm-install : helm-uninstall # # install bashbot via helm into an existing KinD cluster to /usr/local/bin/bashbot
@@ -226,47 +269,3 @@ test-docker: ## use dockle to test the dockerfile for best practices
226
269
.PHONY : test-go
227
270
test-go : # # run go coverage tests
228
271
@echo " no tests..."
229
-
230
-
231
- # #@ Other stuff
232
-
233
-
234
- .PHONY : help
235
- help : # # this
236
- @echo " +---------------------------------------------------------------+"
237
- @echo " | ____ _ ____ _ |"
238
- @echo " | | _ \ | | | _ \ | | |"
239
- @echo " | | |_) | __ _ ___| |__ | |_) | ___ | |_ |"
240
- @echo " | | _ < / _' / __| '_ \| _ < / _ \| __| |"
241
- @echo " | | |_) | (_| \__ \ | | | |_) | (_) | |_ |"
242
- @echo " | |____/ \__,_|___/_| |_|____/ \___/ \__| |"
243
- @echo " | |"
244
- @echo " | makefile targets |"
245
- @echo " +---------------------------------------------------------------+"
246
- @echo " $( VERSION) "
247
- @awk ' BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST )
248
-
249
- .PHONY : install-latest
250
- install-latest : # # install the latest version of the bashbot binary to /usr/local/bin/bashbot with wget
251
- wget -q -O /usr/local/bin/bashbot https://github.com/mathew-fleisch/bashbot/releases/download/$(LATEST_VERSION ) /bashbot-$(GOOS ) -$(GOARCH )
252
- chmod +x /usr/local/bin/bashbot
253
- ifeq ($(shell uname -s) ,Darwin)
254
- @echo "To add bashbot to an allowlist:"
255
- @echo "xattr -d com.apple.quarantine /usr/local/bin/bashbot"
256
- endif
257
- bashbot version
258
- @echo "Run 'bashbot --help' for more information"
259
-
260
- .PHONY : update-asdf-deps
261
- update-asdf-deps : # # trigger github action to update asdf dependencies listed in .tool-versions (requires GIT_TOKEN)
262
- @curl -s -H " Accept: application/vnd.github.everest-preview+json" \
263
- -H " Authorization: token $( GIT_TOKEN) " \
264
- --request POST \
265
- --data ' {"event_type": "trigger-asdf-update"}' \
266
- https://api.github.com/repos/mathew-fleisch/bashbot/dispatches
267
- @echo " Updating asdf dependencies via github-action: https://github.com/mathew-fleisch/bashbot/actions/workflows/update-asdf-versions.yaml"
268
-
269
- .PHONY : gif
270
- gif : # # Create a gif from a quicktime screen recording that has been exported to .mp4 from imovie
271
- @echo " Generating gif"
272
- @ffmpeg -i examples/$(example ) /$(example ) .mp4 -r 10 -pix_fmt rgb24 examples/$(example ) /$(example ) .gif
0 commit comments