.PHONY: help clean get upgrade format lint gen # Adding a help file: https://gist.github.com/prwhite/8168133#gistcomment-1313022 help: ## This help dialog. @IFS=$$'\n' ; \ help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \ for help_line in $${help_lines[@]}; do \ IFS=$$'#' ; \ help_split=($$help_line) ; \ help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \ printf "%-30s %s\n" $$help_command $$help_info ; \ done clean: ## Cleans the environment. @echo "• Cleaning the project..." @rm -rf pubspec.lock @flutter clean get: ## Gets the dependencies. @echo "• Getting the dependencies..." @flutter pub get upgrade: clean ## Upgrades dependencies. @echo "• Upgrading dependencies..." @flutter pub upgrade format: ## Formats the code. @echo "• Formatting the code" @dart format . --fix lint: ## Lints the code. @echo "• Verifying code..." @dart analyze . || (echo "Error in project"; exit 1) gen: get ## Run build_runner (Freezed, Fluttergen, etc...) @echo "• Running build_runner scripts" @flutter pub run build_runner build