Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Remove libcompose/cli #528

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all build binary clean cross-binary help test test-unit test-integration test-acceptance validate
.PHONY: all build clean help test test-unit test-integration test-acceptance validate

LIBCOMPOSE_ENVS := \
-e OS_PLATFORM_ARG \
Expand All @@ -21,28 +21,22 @@ DAEMON_VERSION := $(if $(DAEMON_VERSION),$(DAEMON_VERSION),"default")
TTY := $(shell [ -t 0 ] && echo "-t")
DOCKER_RUN_LIBCOMPOSE := docker run --rm -i $(TTY) --privileged -e DAEMON_VERSION="$(DAEMON_VERSION)" $(LIBCOMPOSE_ENVS) $(LIBCOMPOSE_MOUNT) "$(LIBCOMPOSE_IMAGE)"

default: binary
default: test

all: build ## validate all checks, build linux binary, run all tests\ncross build non-linux binaries
all: build ## validate all checks, run all tests
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh

binary: build ## build the linux binary
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary

cross-binary: build ## cross build the non linux binaries (windows, darwin)
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh cross-binary

test: build ## run the unit, integration and acceptance tests
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-unit test-integration test-acceptance
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh test-unit test-integration test-acceptance

test-unit: build ## run the unit tests
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh test-unit

test-integration: build ## run the integration tests
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-integration
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh test-integration

test-acceptance: build ## run the acceptance tests
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh binary test-acceptance
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh test-acceptance

validate: build ## validate DCO, git conflicts marks, gofmt, golint and go vet
$(DOCKER_RUN_LIBCOMPOSE) ./hack/make.sh validate-dco validate-git-marks validate-gofmt validate-lint validate-vet
Expand Down
63 changes: 0 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,69 +68,6 @@ func main() {
}
```


## Building

You need either [Docker](http://github.com/docker/docker) and `make`,
or `go` in order to build libcompose.

### Building with `docker`

You need Docker and ``make`` and then run the ``binary`` target. This
will create binary for all platform in the `bundles` folder.

```bash
$ make binary
docker build -t "libcompose-dev:refactor-makefile" .
# […]
---> Making bundle: binary (in .)
Number of parallel builds: 4

--> darwin/386: github.com/docker/libcompose/cli/main
--> darwin/amd64: github.com/docker/libcompose/cli/main
--> linux/386: github.com/docker/libcompose/cli/main
--> linux/amd64: github.com/docker/libcompose/cli/main
--> linux/arm: github.com/docker/libcompose/cli/main
--> windows/386: github.com/docker/libcompose/cli/main
--> windows/amd64: github.com/docker/libcompose/cli/main

$ ls bundles
libcompose-cli_darwin-386* libcompose-cli_linux-amd64* libcompose-cli_windows-amd64.exe*
libcompose-cli_darwin-amd64* libcompose-cli_linux-arm*
libcompose-cli_linux-386* libcompose-cli_windows-386.exe*
```


### Building with `go`

- You need `go` v1.11 or greater
- you need to set export `GO111MODULE=on` environment variable
- If your working copy is not in your `GOPATH`, you need to set it
accordingly.

```bash
$ go generate
# Generate some stuff
$ go build -o libcompose ./cli/main
```


## Running

A partial implementation of the libcompose-cli CLI is also implemented in Go. The primary purpose of this code is so one can easily test the behavior of libcompose.

Run one of these:

```
libcompose-cli_darwin-386
libcompose-cli_linux-amd64
libcompose-cli_windows-amd64.exe
libcompose-cli_darwin-amd64
libcompose-cli_linux-arm
libcompose-cli_linux-386
libcompose-cli_windows-386.exe
```

## Tests (unit & integration)


Expand Down
Loading