VERSION := $(shell yq -r .version Chart.yaml)

build_only:
	helm package . --dependency-update

push_only:
	helm push nextcloud-${VERSION}.tgz oci://git.djf.lol/davidfrickert/nextcloud

build_cleanup:
	rm -rf charts

artifact_cleanup:
	rm -f nextcloud-${VERSION}.tgz

build: build_only build_cleanup

push: push_only artifact_cleanup_cleanup

cleanup: build_cleanup artifact_cleanup