* master: (427 commits) chore(deps): bump gunicorn from 25.0.2 to 25.1.0 in /tests/apps/multi chore(deps): bump flask from 3.1.2 to 3.1.3 in /tests/apps/multi chore(deps): bump python in /docs/_build chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc chore(deps): bump qs from 6.14.1 to 6.14.2 in /tests/apps/checks-root chore(deps): bump rack from 3.2.4 to 3.2.5 in /tests/apps/ruby fix: call correct function for limiting letsencrypt to certain domains chore(deps): bump gunicorn in /tests/apps/python-flask chore(deps): bump whitenoise in /tests/apps/dockerfile-release chore(deps): bump phusion/baseimage from noble-1.0.2 to noble-1.0.3 chore(deps): bump actions/upload-artifact from 6 to 7 chore(deps): bump actions/download-artifact from 7 to 8 chore(deps): bump github.com/traefik/traefik/v2 chore(deps): bump gunicorn in /tests/apps/dockerfile-release chore(deps): bump flask from 3.1.2 to 3.1.3 in /tests/apps/python-flask chore(deps): bump traefik from 3.6.7 to 3.6.9 in /plugins/traefik-vhosts chore(deps): bump mkdocs-material from 9.7.1 to 9.7.3 in /docs/_build chore(deps): bump byjg/easy-haproxy in /plugins/haproxy-vhosts chore(deps): bump dj-database-url in /tests/apps/dockerfile-release chore(deps): bump werkzeug in /tests/apps/python-flask ... # Conflicts: # common.mk # contrib/dependencies.json
50 lines
1.5 KiB
Makefile
50 lines
1.5 KiB
Makefile
GO_ARGS ?=
|
|
GO_PLUGIN_MAKE_TARGET ?= build
|
|
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
|
BUILD_IMAGE := hub.diyla.com/golang:1.25.5
|
|
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
|
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
|
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
|
GOARCH ?= amd64
|
|
|
|
.PHONY: build-in-docker build clean src-clean
|
|
|
|
build: $(BUILD)
|
|
|
|
build-in-docker: clean
|
|
mkdir -p /tmp/dokku-go-build-cache
|
|
docker run --rm \
|
|
-v $(GO_ROOT_MOUNT) \
|
|
-v $(GO_BUILD_CACHE):/root/.cache \
|
|
-v $(GO_MOD_CACHE):/go/pkg/mod \
|
|
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
|
-e GO111MODULE=on \
|
|
-e GOPROXY=https://goproxy.cn,direct \
|
|
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
|
$(BUILD_IMAGE) \
|
|
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) GOWORK=off make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
|
|
|
clean:
|
|
rm -rf $(BUILD)
|
|
find . -xtype l -delete
|
|
|
|
commands: **/**/commands.go
|
|
GOARCH=$(GOARCH) go build -mod=readonly -ldflags="-s -w" $(GO_ARGS) -o commands src/commands/commands.go
|
|
|
|
subcommands:
|
|
GOARCH=$(GOARCH) go build -mod=readonly -ldflags="-s -w" $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
|
|
$(MAKE) $(SUBCOMMANDS)
|
|
|
|
subcommands/%:
|
|
ln -sf subcommands $@
|
|
|
|
src-clean:
|
|
rm -rf .gitignore src vendor Makefile *.go glide.* go.sum go.mod
|
|
|
|
triggers:
|
|
GOARCH=$(GOARCH) go build -mod=readonly -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
|
|
$(MAKE) $(TRIGGERS)
|
|
|
|
triggers/%:
|
|
ln -sf triggers $(shell echo $@ | cut -d '/' -f2)
|