release: kill sum target
Just create the sha256 inline so we know there are there.
Add a 'version' target in Makefile.release that prints the version so we
can double check that easily in the release script.
@@ -55,7 +55,7 @@ endif
all:
@echo Use the 'release' target to build a release, 'docker' for docker build.
-release: pre build tar sum
+release: pre build tar
docker: docker-build
@@ -86,12 +86,6 @@ tar:
tar -zcf release/$(NAME)_$(VERSION)_linux_$$arch.tgz -C build/linux/$$arch $(NAME) ;\
done
-.PHONY: sum
-sum:
- for asset in `ls -A release/*tgz`; do \
- sha256sum $$asset > $$asset.sha256; \
- done
-
.PHONY: github-push
github-push:
@echo Releasing: $(VERSION)
@@ -104,6 +98,9 @@ github-push:
--data-binary "@$$asset" \
"https://uploads.github.com/repos/$(GITHUB)/$(NAME)/releases/$(RELEASE)/assets?name=$${asset}&access_token=${GITHUB_ACCESS_TOKEN}" ; \
done
+ for asset in `ls -A release/*tgz`; do \
+ sha256sum $$asset > $$asset.sha256; \
+ done
@for asset in `ls -A release/*sha256`; do \
echo $$asset; \
curl -o /dev/null -X POST \
@@ -136,6 +133,10 @@ docker-push:
manifest-tool push from-args --platforms $(PLATFORMS) --template $(DOCKER_IMAGE_NAME):coredns-ARCH --target $(DOCKER_IMAGE_NAME):$(VERSION)
manifest-tool push from-args --platforms $(PLATFORMS) --template $(DOCKER_IMAGE_NAME):coredns-ARCH --target $(DOCKER_IMAGE_NAME):latest
+.PHONY: version
+version:
+ @echo $(VERSION)
+
.PHONY: clean
clean:
rm -rf release
