diff --git a/Makefile b/Makefile index 0a25a641305..bfb5f40694e 100644 --- a/Makefile +++ b/Makefile @@ -442,6 +442,16 @@ start-mysql: bins start-postgres: bins ./cadence-server --zone postgres start +deps: ## Check for dependency updates, for things that are directly imported + @# filter things that do not contain 'indirect:true' + @make --no-print-directory DEPS_FILTER=' | select(has("Indirect") | not) ' deps-all + +deps-all: ## Check for all dependency updates + @# list all updates, compute seconds -> days between current version and latest version dates, format for display and sort + @go list -u -m -json all \ + | jq 'select(.Update) $(DEPS_FILTER) | . + {Age:(((.Update.Time | fromdate) - (.Time | fromdate))/60/60/24 | floor)} | (.Age | tostring) + " days: " + .Path' --raw-output \ + | sort -n + help: @# print help first, so it's visible @printf "\033[36m%-20s\033[0m %s\n" 'help' 'Prints a help message showing any specially-commented targets'