summaryrefslogtreecommitdiff
path: root/docs/remote-docs.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2021-04-08 14:30:40 -0400
committerChris Evich <cevich@redhat.com>2021-04-12 10:21:28 -0400
commitb6b0b6e8bd0f8c75fe9411f722a43f9305c6137a (patch)
treefea2024764c18861d58f9d6f6707ec8b2a8d8368 /docs/remote-docs.sh
parenta4686883b7c2b8388c8eb4efdf320f12064b4bc7 (diff)
downloadpodman-b6b0b6e8bd0f8c75fe9411f722a43f9305c6137a.tar.gz
podman-b6b0b6e8bd0f8c75fe9411f722a43f9305c6137a.tar.bz2
podman-b6b0b6e8bd0f8c75fe9411f722a43f9305c6137a.zip
Overhaul Makefile binary and release worflows
* Incorporate changes from abandoned #9918: Use dedicated `bin` sub-directories for `windows` and `darwin` when building `podman-remote`. The linux flavor remains under `bin` as before. * Fix MacOS Documentation-generation for release-packaging. The `install-podman-remote-%-docs` target requires local execution of `podman-remote`, but it was assuming GOOS=linux. Fix this by dynamically discovering the local OS/architecture type while still permitting cross-building of MacOS binaries under Linux. * Unify temporary directory/file behavior to use a common template. In case of left-over temporary items left in the repository, update the `clean` target accordingly to remove them. * Fix broken podman-remote-static and MacOS release archive targets mismatching the `podman-remote-%` target. Disambiguate this target for all platforms by spelling each out in full, instead of using a wild-card recipe. * Fix Windows-installer target to properly recognize existing output files and not constantly rebuild every time. * Include the podman version number in the Windows-installer target in case a user downloads multiple releases. * Include a subdirectory containing the podman version number for both `tar.gz` and `zip` targets. This prevents users clobbering existing directories when un-archiving from releases. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'docs/remote-docs.sh')
-rwxr-xr-xdocs/remote-docs.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh
index 67c731e75..2b7d73cd3 100755
--- a/docs/remote-docs.sh
+++ b/docs/remote-docs.sh
@@ -6,7 +6,17 @@ PLATFORM=$1 ## linux, windows or darwin
TARGET=${2} ## where to output files
SOURCES=${@:3} ## directories to find markdown files
-PODMAN=${PODMAN:-bin/podman-remote} ## location overridden for testing
+# Overriden for testing. Native podman-remote binary expected filepaths
+if [[ -z "$PODMAN" ]]; then
+ case $(env -i HOME=$HOME PATH=$PATH go env GOOS) in
+ windows)
+ PODMAN=bin/windows/podman.exe ;;
+ darwin)
+ PODMAN=bin/darwin/podman ;;
+ *) # Assume "linux"
+ PODMAN=bin/podman-remote ;;
+ esac
+fi
function usage() {
echo >&2 "$0 PLATFORM TARGET SOURCES..."