]> Nutra Git (v1) - nutratech/usda-sqlite.git/commitdiff
del deploy/install-prod and _check-git-up-to-date
authorShane Jaroch <chown_tee@proton.me>
Thu, 18 Apr 2024 16:10:41 +0000 (12:10 -0400)
committerShane Jaroch <chown_tee@proton.me>
Thu, 18 Apr 2024 16:10:41 +0000 (12:10 -0400)
Makefile

index c01090e74efba6524009891dc561e635c9282779..1bb91a4e0123322b4177d5cc2cca25ea4fab074d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ SHELL=/bin/bash
 # 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'
 
 
 
@@ -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