Documenation & build automation for remote darwin

Created shell script to automatically compile remote-only docs & rename
Added make brew-pkg to automatically package files needed for homebrew
Add missing docs

Signed-off-by: Ashley Cui <ashleycui16@gmail.com>
This commit is contained in:
Ashley Cui
2019-07-01 14:52:55 -04:00
parent 7dbc6d8f36
commit ce0132a45e
7 changed files with 178 additions and 1 deletions

View File

@ -75,11 +75,13 @@ LIBSECCOMP_COMMIT := release-2.3
GINKGOTIMEOUT ?= -timeout=90m
RELEASE_VERSION ?= $(shell git fetch --tags && git describe HEAD 2> /dev/null)
RELEASE_NUMBER ?= $(shell echo $(RELEASE_VERSION) | sed 's/-.*//')
RELEASE_DIST ?= $(shell ( source /etc/os-release; echo $$ID ))
RELEASE_DIST_VER ?= $(shell ( source /etc/os-release; echo $$VERSION_ID | cut -d '.' -f 1))
RELEASE_ARCH ?= $(shell go env GOARCH 2> /dev/null)
RELEASE_BASENAME := $(shell basename $(PROJECT))
# If GOPATH not specified, use one in the local directory
ifeq ($(GOPATH),)
export GOPATH := $(CURDIR)/_output
@ -143,7 +145,6 @@ gofmt: ## Verify the source code gofmt
find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
git diff --exit-code
test/checkseccomp/checkseccomp: .gopathok $(wildcard test/checkseccomp/*.go)
$(GO) build -ldflags '$(LDFLAGS)' -tags "$(BUILDTAGS) containers_image_ostree_stub" -o $@ $(PROJECT)/test/checkseccomp
@ -175,8 +176,10 @@ clean: ## Clean artifacts
.gopathok \
_output \
podman*.zip \
podman*.tar.gz \
bin \
build \
docs/remote \
test/checkseccomp/checkseccomp \
test/goecho/goecho \
test/testdata/redis-image \
@ -292,6 +295,22 @@ $(MANPAGES): %: %.md .gopathok
docs: $(MANPAGES) ## Generate documentation
install-podman-remote-docs: docs
@(cd docs; ./podman-remote.sh ./remote)
brew-pkg: install-podman-remote-docs podman-remote-darwin
@mkdir -p ./brew
@cp ./bin/podman-remote-darwin ./brew/podman
@cp -r ./docs/remote ./brew/docs/
@cp docs/podman-remote.1 ./brew/docs/podman.1
@sed -i 's/podman\\*-remote/podman/g' ./brew/docs/podman.1
@sed -i 's/Podman\\*-remote/Podman\ for\ Mac/g' ./brew/docs/podman.1
@sed -i 's/podman\.conf/podman\-remote\.conf/g' ./brew/docs/podman.1
@sed -i 's/A\ remote\ CLI\ for\ Podman\:\ //g' ./brew/docs/podman.1
tar -czvf podman-${RELEASE_NUMBER}.tar.gz ./brew
@rm -rf ./brew
docker-docs: docs
(cd docs; ./dckrman.sh *.1)