Skip to content

Commit

Permalink
Add dist target (#21)
Browse files Browse the repository at this point in the history
* Add dist target
  • Loading branch information
osterman authored Jun 28, 2018
1 parent 62663d3 commit 9b9976e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ FROM alpine:3.7
ENV INSTALL_PATH=/packages/bin
ENV PATH=${INSTALL_PATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN mkdir -p ${INSTALL_PATH}
RUN apk add --update --no-cache make curl coreutils libc6-compat
RUN apk add --update --no-cache bash make curl coreutils libc6-compat

COPY --from=cfssl /go/bin/ ${INSTALL_PATH}/

ADD . /packages
RUN make -C /packages/install/ all
WORKDIR /opt
WORKDIR /packages
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@ export DOCKER_BUILD_FLAGS =
export DEFAULT_HELP_TARGET := help/install
export README_DEPS ?= docs/targets.md

export DIST_CMD ?= cp -a
export DIST_PATH ?= /dist
export INSTALL_PATH ?= /packages/bin

-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)

all: init deps build install run

deps:
@exit 0

## Create a distribution by coping $PACKAGES from $INSTALL_PATH to $DIST_PATH
dist:
mkdir -p $(DIST_PATH)
cd $(INSTALL_PATH) && $(DIST_CMD) $(PACKAGES) $(DIST_PATH)

build:
@make --no-print-directory docker:build

Expand Down

0 comments on commit 9b9976e

Please sign in to comment.