Last active
June 27, 2025 02:52
-
-
Save davesnx/643af12dca2a7cfcd481fd3949b81f82 to your computer and use it in GitHub Desktop.
Revisions
-
davesnx renamed this gist
Nov 22, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
davesnx revised this gist
Nov 9, 2021 . 2 changed files with 24 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,22 @@ .PHONY: help # Set default action to be help! help: @echo "List of available make commands"; @echo ""; @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'; @echo ""; # Add double ## comments on the same line as the dependencies and will be printed out when running help # Don't add them if you don't want to appear on help! ##### Some placeholder actions ##### build: ## Build the project @echo "build project" clean: ## Clean the artifacts @echo "clean" test: @echo "running tests..." @echo "GREEN" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ make List of available make commands build Build the project clean Clean the artifacts test Test the project -
davesnx revised this gist
Aug 31, 2021 . 1 changed file with 0 additions and 75 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,75 +0,0 @@ -
davesnx created this gist
Aug 31, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,75 @@ .DEFAULT_GOAL := help project_name = open-graph-images-generator opam_file = $(project_name).opam DUNE = opam exec -- dune .PHONY: help help: @echo ""; @echo "List of available make commands"; @echo ""; @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'; @echo ""; .PHONY: init init: ## Create a local opam switch and install dev dependencies @opam switch create . 4.12.0 --deps-only @opam install ocaml-lsp-server dune .PHONY: install install: ## Install dependencies @opam install . --deps-only --with-doc --with-test --locked -y .PHONY: build build: ## Build the app $(DUNE) build @all .PHONY: watch watch: ## Watch the fs and re-run the server @watchexec -w source \ --exts re,rei,ml,mli,json -r -c \ "clear; $(MAKE) run-debug" .PHONY: test test: ## Run unit tests @echo "No tests implemented" @$(DUNE) test --force .PHONY: run run: ## Run the server @$(DUNE) exec $(project_name) .PHONY: run-debug run-debug: @$(DUNE) exec $(project_name) -- --debug # .PHONY: migrate # migrate: # Run the database migrations defined in migrate/migrate.ml # @$(DUNE) exec migrate # .PHONY: rollback # rollback: # Run the database rollback defined in migrate/rollback.ml # @$(DUNE) exec rollback .PHONY: deps # Alias to update the opam file and install the needed deps deps: update-opam-file install .PHONY: clean clean: $(DUNE) clean #docker_clean: # @docker container ls -qa | xargs -n1 docker container stop # @docker container ls -qa | xargs -n1 docker container rm # @docker volume ls -q | xargs -n1 docker volume rm # #down: # @docker compose -f docker-compose.dev.yml down # # up: # @docker compose -f docker-compose.dev.yml -p $(project_name) up update-opam-file: # Update the package dependencies when new deps are added to dune-project @$(DUNE) build @install # Update the $(project_name).opam file This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ .PHONY: help help: @echo "List of available make commands"; @echo ""; @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'; @echo "";