# NOTE: must put a <TAB> character and two pound "\t##" to show up in this list. Keep it brief! IGNORE_ME
.PHONY: _help
_help:
- @grep -h "##" $(MAKEFILE_LIST) | grep -v IGNORE_ME | sed -e 's/##//' | column -t -s $$'\t'
+ @grep -h "##" $(MAKEFILE_LIST) | grep -v IGNORE_ME | grep -v ^# | sed -e 's/##//' | column -t -s $$'\t'
# TODO: what about import.sql? It gets formatted too ugly
# TODO: what about Python files?
pg_format -L -s 2 -w 100 sql/tables.sql >sql/tables.fmt.sql
- mv sql/tables.fmt.sql sql/tables.sql\
+ mv sql/tables.fmt.sql sql/tables.sql
.PHONY: build
build: clean
build: ## Build the release (compressed XZ file)
+ test "${DB_VERSION}"
./sql/build.sh ${DB_VERSION}
du -h ${DB_XZ_FILE}
- git tag -d v${DB_VERSION}
-REMOTE_HEAD ?= origin/master
-PROJECT_NAME ?= usda-sqlite
-
-.PHONY: _check-git-up-to-date
-_check-git-up-to-date:
- git branch --show-current
- git fetch
- # Check that we are in sync with ${REMOTE_HEAD}
- git diff --quiet ${REMOTE_HEAD}
-
-
-.PHONY: deploy/install-prod
-deploy/install-prod: _check-git-up-to-date
-deploy/install-prod: ## Install (on prod VPS)
- # Check the version string was extracted from package.json
- test -n "${DB_VERSION}"
- # Download ${DB_VERSION}
- curl -sSLO https://github.com/nutratech/${PROJECT_NAME}/releases/download/${DB_VERSION}/${DB_XZ_FILE}
- tar xf ${DB_XZ_FILE}
-
-
# ---------------------------------------
# Clean & extras
$(foreach v, $(.VARIABLES), $(if $(filter file, $(origin $(v))), $(info $(v)=$($(v)))))
.PHONY: extras/cloc
-extras/cloc:
+extras/cloc: ## count lines of code
cloc HEAD --exclude-dir=usda.svg