Browse Source

Update all make targets and Readme for building

tags/v1.0.1
IamTheFij 1 month ago
parent
commit
a6b46bfca2
2 changed files with 12 additions and 8 deletions
  1. 8
    8
      Makefile
  2. 4
    0
      README.md

+ 8
- 8
Makefile View File

@@ -16,7 +16,7 @@ run:
go run *.go

# Output target
dockron: vendor
dockron:
@echo Version: $(VERSION)
go build -ldflags '-X "main.version=${VERSION}"' -o dockron

@@ -24,22 +24,22 @@ dockron: vendor
.PHONY: build
build: dockron

dockron-darwin-amd64: vendor
dockron-darwin-amd64:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
-o dockron-darwin-amd64

dockron-linux-amd64: vendor
dockron-linux-amd64:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
-o dockron-linux-amd64

dockron-linux-arm: vendor
dockron-linux-arm:
GOOS=linux GOARCH=arm CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
-o dockron-linux-arm

dockron-linux-arm64: vendor
dockron-linux-arm64:
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
-o dockron-linux-arm64
@@ -62,16 +62,16 @@ clean-vendor:
rm -fr ./vendor

.PHONY: docker-build
docker-build:
docker-build: dockron-linux-amd64
docker build . -t ${DOCKER_TAG}-linux-amd64

# Cross build for arm architechtures
.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

.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

.PHONY: docker-run

+ 4
- 0
README.md View File

@@ -49,3 +49,7 @@ I intend to keep it simple as well. It will likely never:
* Handle job dependencies

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…
Cancel
Save