# This Makefile is useful as long as the 'gomodcache' strategy
# has not made it into obs-service-go_modules

gomodcache := gomodcache
workdir := $(shell pwd)

gomodcache.tar.gz: $(gomodcache)
	tar -czf gomodcache.tar.gz -C $(workdir) $(gomodcache)/cache

harbor:
	osc -A https://api.suse.de service mr obs_scm

$(gomodcache): harbor
	cd harbor/src; \
	GOMODCACHE=$(workdir)/$(gomodcache) go mod download

.PHONY: clean
clean:
	GOMODCACHE=$(workdir)/$(gomodcache) go clean -modcache
