Commit Graph

12 Commits

Author SHA1 Message Date
Guillaume Tardif 0bcba8d1d2 Set LD_FLAG version from git tag. Displayed version will be (default behaviour of git describe —tags):
* release version : if tag `v0.1.2` is exactly on the built commit : `0.1.2` (strip v when displaying `docker version`)
* dev version : if tag `v0.1.2` is 3 commits before, and we are on commit `xyz` : `0.1.2-3-xyz` 
* will only match tags starting with `v[0-9]`
2020-06-25 13:50:16 +02:00
Djordje Lukic ad72c866cc Add license headers 2020-06-18 16:48:03 +02:00
Djordje Lukic 39042aa8bd Build example and local backend conditionaly
* `make` will build the cli with all backends exnabled
* `make cross` will cross build without the example and local backend

You can still cross compile with all backends by doing

```console
$ BUILD_TAGS=example,local make cross
```

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-06-15 18:02:30 +02:00
Christopher Crone 654f9ebbaf Tidy Makefiles
* Make BINARY mutability explicit
* Default docker build output type is local so use this

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-06-02 11:58:29 +02:00
Djordje Lukic 129e675932 Put all protos inside the `protos` package 2020-05-25 15:04:28 +02:00
Djordje Lukic fe36c49246 Use alpine as base image
Installing docker on buster is a pain, use alpine to install it
2020-05-20 18:39:10 +02:00
Christopher Crone a8146ad59c Rework e2e tests into suite
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-20 15:57:10 +02:00
Djordje Lukic 7b26e8e836 Faster build
* Run  in parallel
  * lint
  * test/build/e2e test
* use cache for go
* do not use docker for building
* remove useless dependencies from the base image

Build time passes from 5 minutes to 1 minute 30 seconds
2020-05-14 21:16:31 +02:00
Djordje Lukic 4e9a4185af Add `make lint` and run it on CI 2020-05-05 10:50:30 +02:00
Djordje Lukic ba8c824436 Cleanup Makefiles
* add `make help` target
* remove unused variables
* add .exe to the binary name when on windows
* add ldflags to go build to strip the binary (smaller binary size)
* `make protos` must be executed manually when proto files change
2020-05-05 10:07:11 +02:00
Djordje Lukic 9fd5f7bef3 Rename xcli to cross 2020-05-04 11:35:11 +02:00
Djordje Lukic 600feb1e00 Split makefiles
* Makefile is for users to use
* builder.Makefile is used by the builder container
2020-05-04 11:35:11 +02:00