From 459f751ae328382c09bb33dbbdd2d1741b13bf8d Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Mon, 17 Apr 2023 14:40:55 -0400 Subject: [PATCH] Makefile: include `release-artifacts` target The current release artifacts generation process is still fairly manual with a bunch of steps. This commit bundles them all into a single convenient Makefile target. The `clean-binaries` target ends up removing `bin/`. So, the artifact dir has been changed to `release/` instead of the current `bin/` to avoid breaking other Makefile targets. Related: https://github.com/containers/podman/issues/18215 Signed-off-by: Lokesh Mandvekar --- Makefile | 18 ++++++++++++++++++ RELEASE_PROCESS.md | 15 ++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 1fdf7707c6..972fc9bc29 100644 --- a/Makefile +++ b/Makefile @@ -951,6 +951,24 @@ install.tools: .install.golangci-lint ## Install needed tools $(PYTHON) -m pip install --user pre-commit; \ fi +.PHONY: release-artifacts +release-artifacts: clean-binaries + mkdir -p release/ + $(MAKE) podman-remote-release-darwin_amd64.zip + mv podman-remote-release-darwin_amd64.zip release/ + $(MAKE) podman-remote-release-darwin_arm64.zip + mv podman-remote-release-darwin_arm64.zip release/ + $(MAKE) podman-remote-release-windows_amd64.zip + mv podman-remote-release-windows_amd64.zip release/ + $(MAKE) podman-remote-static-linux_amd64 + tar -cvzf podman-remote-static-linux_amd64.tar.gz bin/podman-remote-static-linux_amd64 + $(MAKE) podman-remote-static-linux_arm64 + tar -cvzf podman-remote-static-linux_arm64.tar.gz bin/podman-remote-static-linux_arm64 + mv podman-remote-static-linux*.tar.gz release/ + $(MAKE) podman.msi + mv podman-v*.msi release/ + cd release/; sha256sum *.zip *.tar.gz *.msi > shasums + .PHONY: uninstall uninstall: for i in $(filter %.1,$(MANPAGES_DEST)); do \ diff --git a/RELEASE_PROCESS.md b/RELEASE_PROCESS.md index 45c7dc9c45..19b6f039d0 100644 --- a/RELEASE_PROCESS.md +++ b/RELEASE_PROCESS.md @@ -241,16 +241,7 @@ spelled with complete minutiae. ```shell $ git checkout vX.Y.Z - $ make podman-remote-release-darwin_amd64.zip \ - podman-remote-release-darwin_arm64.zip \ - podman-remote-release-windows_amd64.zip \ - podman-remote-static-linux_amd64 \ - podman-remote-static-linux_arm64 - $ mv podman-* bin/ - $ cd bin/ - $ tar -cvzf podman-remote-static-linux_amd64.tar.gz podman-remote-static-linux_amd64 - $ tar -cvzf podman-remote-static-linux_arm64.tar.gz podman-remote-static-linux_arm64 - $ sha256sum *.zip *.tar.gz > shasums + $ make release-artifacts ``` 1. The `podman-vX.Y.Z.dmg` file is produced manually by someone in @@ -267,9 +258,7 @@ spelled with complete minutiae. the release. 1. Near the bottom of the page there is a box with the message “Add binaries by dropping them here or selecting them”. Use - that to upload the artifacts you previously downloaded, including - the `shasums` file. - + that to upload the artifacts in the `release/` dir generated earlier: * podman-remote-release-darwin_amd64.zip * podman-remote-release-darwin_arm64.zip * podman-remote-release-windows_amd64.zip