diff --git a/.docker-build-cli.sh b/.docker-build-cli.sh new file mode 100755 index 0000000000..10a0648d83 --- /dev/null +++ b/.docker-build-cli.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# For execution on docker build image only ! +# make cargo-cli ARGS="build --release" +make discovery1-cli-cargo ARGS="build --release" +find gen -executable -type f -path "*/release/*" -not \( -name "*.*" -or -name "*script*" \) | xargs cp -v /build-result \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4bf80387e3..97f07e2530 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .timestamp -.pyenv +.pyenv-* .virtualenv gen/doc/ *.go diff --git a/Makefile b/Makefile index 92faff5925..ea0eee6079 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,16 @@ -.PHONY: clean help deps regen-apis license +.PHONY: clean help deps regen-apis license ubuntu-build .SUFFIXES: VENV = .virtualenv/virtualenv.py -VENV_DIR := .pyenv +VENV_DIR := .pyenv-$(shell uname) PYTHON := $(VENV_DIR)/bin/python PIP := $(VENV_DIR)/bin/pip MAKO_RENDER := etc/bin/mako-render API_VERSION_GEN := etc/bin/api_version_to_yaml.py TPL := $(PYTHON) $(MAKO_RENDER) MKDOCS := $(shell pwd)/$(VENV_DIR)/bin/mkdocs +WHEEZY_IMAGE := byron/rust-binaries.nightly.debian-wheezy +WHEEZY_BUILD_OUTPUT := build/wheezy-x64 MAKO_SRC = src/mako RUST_SRC = src/rust @@ -40,6 +42,7 @@ help: $(info help-cli - show all cli targets to build individually) $(info docs-all - cargo-doc on all APIs and associates, assemble them together and generate index) $(info docs-all-clean - remove the entire set of generated documentation) + $(info wheezy-build - build --release all CLI on ubuntu using docker) $(info github-pages - invoke ghp-import on all documentation) $(info regen-apis - clear out all generated apis, and regenerate them) $(info license - regenerate the main license file) @@ -76,6 +79,11 @@ LICENSE.md: $(MAKO_SRC)/LICENSE.md.mako $(API_SHARED_INFO) $(MAKO_RENDER) license: LICENSE.md +wheezy-build: + @-rm -Rf WHEEZY_BUILD_OUTPUT + @mkdir -p $(WHEEZY_BUILD_OUTPUT) + docker run -v $(PWD):/source -v $(PWD)/$(WHEEZY_BUILD_OUTPUT):/build-result $(WHEEZY_IMAGE) /source/.docker-build-cli.sh + regen-apis: | clean-all-api clean-all-cli gen-all-api gen-all-cli license clean: clean-all-api clean-all-cli