We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As it stands there's no notification that the cached makefiles in a project are out of date.
I don't think it's worth making this too fancy, just do a HEAD of the download URL and compare the ETag, something like that.
HEAD
Perhaps on make precommit would be best?
make precommit
The text was updated successfully, but these errors were encountered:
@jmalloc @ezzatron
The following makes the client self updating:
CORE_VERSION_FILE := $(MF_PROJECT_ROOT)/artifacts/core-version.txt REMOTE_CORE_VERSION := $(shell curl -Is https://makefiles.dev/v1 | grep etag | cut -d ':' -f2 | xargs) LOCAL_CORE_VERSION := $(shell cat "${CORE_VERSION_FILE}" 2>/dev/null) UPDATE_FILE := artifacts/update.touch # precommit --- Perform tasks that need to be executed before committing. .PHONY: precommit precommit:: update # update --- Checks for updates and applies if required. .PHONY: update update: update-core $(UPDATE_FILE) # update-core --- Checks if core needs updating. .PHONY: update-core update-core: ifneq ($(REMOTE_CORE_VERSION),$(LOCAL_CORE_VERSION)) @echo "Remote core version: '$(REMOTE_CORE_VERSION)'" @echo "Local core version: '$(LOCAL_CORE_VERSION)'" @echo "Core update required" @rm -f $(UPDATE_FILE) endif $(UPDATE_FILE): @rm -rf $(MF_ROOT) artifacts @mkdir -p "$(@D)" @echo "$(REMOTE_CORE_VERSION)" > $(CORE_VERSION_FILE) @touch "$@"
Sorry, something went wrong.
No branches or pull requests
As it stands there's no notification that the cached makefiles in a project are out of date.
I don't think it's worth making this too fancy, just do a
HEAD
of the download URL and compare the ETag, something like that.Perhaps on
make precommit
would be best?The text was updated successfully, but these errors were encountered: