Update all make targets and Readme for building
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c9374f5e83
commit
a6b46bfca2
16
Makefile
16
Makefile
@ -16,7 +16,7 @@ run:
|
|||||||
go run *.go
|
go run *.go
|
||||||
|
|
||||||
# Output target
|
# Output target
|
||||||
dockron: vendor
|
dockron:
|
||||||
@echo Version: $(VERSION)
|
@echo Version: $(VERSION)
|
||||||
go build -ldflags '-X "main.version=${VERSION}"' -o dockron
|
go build -ldflags '-X "main.version=${VERSION}"' -o dockron
|
||||||
|
|
||||||
@ -24,22 +24,22 @@ dockron: vendor
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: dockron
|
build: dockron
|
||||||
|
|
||||||
dockron-darwin-amd64: vendor
|
dockron-darwin-amd64:
|
||||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
|
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
|
||||||
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
||||||
-o dockron-darwin-amd64
|
-o dockron-darwin-amd64
|
||||||
|
|
||||||
dockron-linux-amd64: vendor
|
dockron-linux-amd64:
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
|
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
|
||||||
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
||||||
-o dockron-linux-amd64
|
-o dockron-linux-amd64
|
||||||
|
|
||||||
dockron-linux-arm: vendor
|
dockron-linux-arm:
|
||||||
GOOS=linux GOARCH=arm CGO_ENABLED=0 \
|
GOOS=linux GOARCH=arm CGO_ENABLED=0 \
|
||||||
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
||||||
-o dockron-linux-arm
|
-o dockron-linux-arm
|
||||||
|
|
||||||
dockron-linux-arm64: vendor
|
dockron-linux-arm64:
|
||||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 \
|
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 \
|
||||||
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
|
||||||
-o dockron-linux-arm64
|
-o dockron-linux-arm64
|
||||||
@ -62,16 +62,16 @@ clean-vendor:
|
|||||||
rm -fr ./vendor
|
rm -fr ./vendor
|
||||||
|
|
||||||
.PHONY: docker-build
|
.PHONY: docker-build
|
||||||
docker-build:
|
docker-build: dockron-linux-amd64
|
||||||
docker build . -t ${DOCKER_TAG}-linux-amd64
|
docker build . -t ${DOCKER_TAG}-linux-amd64
|
||||||
|
|
||||||
# Cross build for arm architechtures
|
# Cross build for arm architechtures
|
||||||
.PHONY: docker-build-arm
|
.PHONY: docker-build-arm
|
||||||
docker-build-arm:
|
docker-build-arm: dockron-linux-arm
|
||||||
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm . -t ${DOCKER_TAG}-linux-arm
|
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm . -t ${DOCKER_TAG}-linux-arm
|
||||||
|
|
||||||
.PHONY: docker-build-arm
|
.PHONY: docker-build-arm
|
||||||
docker-build-arm64:
|
docker-build-arm64: dockron-linux-arm64
|
||||||
docker build --build-arg REPO=arm64v8 --build-arg ARCH=arm64 . -t ${DOCKER_TAG}-linux-arm64
|
docker build --build-arg REPO=arm64v8 --build-arg ARCH=arm64 . -t ${DOCKER_TAG}-linux-arm64
|
||||||
|
|
||||||
.PHONY: docker-run
|
.PHONY: docker-run
|
||||||
|
@ -49,3 +49,7 @@ I intend to keep it simple as well. It will likely never:
|
|||||||
* Handle job dependencies
|
* Handle job dependencies
|
||||||
|
|
||||||
Either use a separate tool in conjunction with Dockron, or use a more robust scheduler like Tron, or Chronos.
|
Either use a separate tool in conjunction with Dockron, or use a more robust scheduler like Tron, or Chronos.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
If you have go on your machine, you can simply use `make build` or `make run` to build and test Dockron. If you don't have go but you do have Docker, you can still build docker images using the provide multi-stage Dockerfile! You can kick that off with `make docker-staged-build`
|
||||||
|
Loading…
Reference in New Issue
Block a user