From 905b3a2653b294bdf4f2931a91660c607bba3ed3 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Thu, 18 Apr 2024 12:10:41 -0400 Subject: [PATCH] del deploy/install-prod and _check-git-up-to-date --- Makefile | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index c01090e..1bb91a4 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ SHELL=/bin/bash # NOTE: must put a 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' @@ -18,7 +18,7 @@ format: ## format SQL with pg_format # 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 @@ -33,6 +33,7 @@ DB_XZ_FILE ?= sql/dist/usda.sqlite3-${DB_VERSION}.tar.xz .PHONY: build build: clean build: ## Build the release (compressed XZ file) + test "${DB_VERSION}" ./sql/build.sh ${DB_VERSION} du -h ${DB_XZ_FILE} @@ -68,27 +69,6 @@ deploy/delete: - 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 @@ -104,5 +84,5 @@ check-vars: ## display all computed vars (won't show passed in) $(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 -- 2.52.0