-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
ce84a03
commit 7537058
Showing
7 changed files
with
149 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl gen dependabot | ||
# devctl@4.0.1 | ||
# | ||
version: 2 | ||
updates: | ||
- package-ecosystem: docker | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
target-branch: master | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
target-branch: master | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
ignore: | ||
- dependency-name: k8s.io/* | ||
versions: | ||
- ">=0.19.0" | ||
- package-ecosystem: docker | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
ignore: | ||
- dependency-name: zricethezav/gitleaks-action | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- giantswarm/team-batman-engineers | ||
ignore: | ||
- dependency-name: k8s.io/* | ||
versions: | ||
- ">=0.19.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl gen workflows | ||
# devctl@4.0.1 | ||
# | ||
name: Create Release PR | ||
on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl gen workflows | ||
# devctl@4.0.1 | ||
# | ||
name: gitleaks | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,12 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# devctl gen makefile | ||
# devctl@4.0.1 | ||
# | ||
|
||
PACKAGE_DIR := ./bin-dist | ||
|
||
APPLICATION := $(shell go list . | cut -d '/' -f 3) | ||
BUILDTIMESTAMP := $(shell date -u '+%FT%TZ') | ||
GITSHA1 := $(shell git rev-parse --verify HEAD) | ||
OS := $(shell go env GOOS) | ||
SOURCES := $(shell find . -name '*.go') | ||
VERSION := $(shell architect project version) | ||
LDFLAGS ?= -w -linkmode 'auto' -extldflags '-static' \ | ||
-X '$(shell go list .)/pkg/project.buildTimestamp=${BUILDTIMESTAMP}' \ | ||
-X '$(shell go list .)/pkg/project.gitSHA=${GITSHA1}' | ||
.DEFAULT_GOAL := build | ||
|
||
.PHONY: build build-darwin build-linux | ||
## build: builds a local binary | ||
build: $(APPLICATION) | ||
@echo "====> $@" | ||
## build-darwin: builds a local binary for darwin/amd64 | ||
build-darwin: $(APPLICATION)-darwin | ||
@echo "====> $@" | ||
## build-linux: builds a local binary for linux/amd64 | ||
build-linux: $(APPLICATION)-linux | ||
@echo "====> $@" | ||
|
||
$(APPLICATION): $(APPLICATION)-v$(VERSION)-$(OS)-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-darwin: $(APPLICATION)-v$(VERSION)-darwin-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-linux: $(APPLICATION)-v$(VERSION)-linux-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES) | ||
@echo "====> $@" | ||
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $@ . | ||
|
||
.PHONY: package-darwin package-linux | ||
## package-darwin: prepares a packaged darwin/amd64 version | ||
package-darwin: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-darwin-amd64.tar.gz | ||
@echo "====> $@" | ||
## package-linux: prepares a packaged linux/amd64 version | ||
package-linux: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-linux-amd64.tar.gz | ||
@echo "====> $@" | ||
|
||
$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: DIR=$(PACKAGE_DIR)/$< | ||
$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: $(APPLICATION)-v$(VERSION)-%-amd64 | ||
@echo "====> $@" | ||
mkdir -p $(DIR) | ||
cp $< $(DIR)/$(APPLICATION) | ||
cp README.md LICENSE $(DIR) | ||
tar -C $(PACKAGE_DIR) -cvzf $(PACKAGE_DIR)/$<.tar.gz $< | ||
rm -rf $(DIR) | ||
rm -rf $< | ||
|
||
.PHONY: install | ||
## install: install the application | ||
install: | ||
@echo "====> $@" | ||
go install -ldflags "$(LDFLAGS)" . | ||
|
||
.PHONY: run | ||
## run: runs go run main.go | ||
run: | ||
@echo "====> $@" | ||
go run -ldflags "$(LDFLAGS)" -race . | ||
|
||
.PHONY: clean | ||
## clean: cleans the binary | ||
clean: | ||
@echo "====> $@" | ||
rm -f $(APPLICATION)* | ||
go clean | ||
|
||
.PHONY: imports | ||
## imports: runs goimports | ||
imports: | ||
@echo "====> $@" | ||
goimports -local $(shell go list .) -w . | ||
|
||
.PHONY: lint | ||
## lint: runs golangci-lint | ||
lint: | ||
@echo "====> $@" | ||
golangci-lint run -E gosec -E goconst --timeout=15m ./... | ||
|
||
.PHONY: test | ||
## test: runs go test with default values | ||
test: | ||
@echo "====> $@" | ||
go test -ldflags "$(LDFLAGS)" -race ./... | ||
|
||
.PHONY: build-docker | ||
## build-docker: builds docker image to registry | ||
build-docker: build-linux | ||
@echo "====> $@" | ||
docker build -t ${APPLICATION}:${VERSION} . | ||
include Makefile.*.mk | ||
|
||
.PHONY: help | ||
## help: prints this help message | ||
help: | ||
@echo "Usage: \n" | ||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | ||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# DO NOT EDIT. Generated with: | ||
# | ||
# [email protected] | ||
# | ||
|
||
PACKAGE_DIR := ./bin-dist | ||
|
||
APPLICATION := $(shell go list . | cut -d '/' -f 3) | ||
BUILDTIMESTAMP := $(shell date -u '+%FT%TZ') | ||
GITSHA1 := $(shell git rev-parse --verify HEAD) | ||
OS := $(shell go env GOOS) | ||
SOURCES := $(shell find . -name '*.go') | ||
VERSION := $(shell architect project version) | ||
LDFLAGS ?= -w -linkmode 'auto' -extldflags '-static' \ | ||
-X '$(shell go list .)/pkg/project.buildTimestamp=${BUILDTIMESTAMP}' \ | ||
-X '$(shell go list .)/pkg/project.gitSHA=${GITSHA1}' | ||
.DEFAULT_GOAL := build | ||
|
||
.PHONY: build build-darwin build-linux | ||
## build: builds a local binary | ||
build: $(APPLICATION) | ||
@echo "====> $@" | ||
## build-darwin: builds a local binary for darwin/amd64 | ||
build-darwin: $(APPLICATION)-darwin | ||
@echo "====> $@" | ||
## build-linux: builds a local binary for linux/amd64 | ||
build-linux: $(APPLICATION)-linux | ||
@echo "====> $@" | ||
|
||
$(APPLICATION): $(APPLICATION)-v$(VERSION)-$(OS)-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-darwin: $(APPLICATION)-v$(VERSION)-darwin-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-linux: $(APPLICATION)-v$(VERSION)-linux-amd64 | ||
@echo "====> $@" | ||
cp -a $< $@ | ||
|
||
$(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES) | ||
@echo "====> $@" | ||
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o $@ . | ||
|
||
.PHONY: package-darwin package-linux | ||
## package-darwin: prepares a packaged darwin/amd64 version | ||
package-darwin: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-darwin-amd64.tar.gz | ||
@echo "====> $@" | ||
## package-linux: prepares a packaged linux/amd64 version | ||
package-linux: $(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-linux-amd64.tar.gz | ||
@echo "====> $@" | ||
|
||
$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: DIR=$(PACKAGE_DIR)/$< | ||
$(PACKAGE_DIR)/$(APPLICATION)-v$(VERSION)-%-amd64.tar.gz: $(APPLICATION)-v$(VERSION)-%-amd64 | ||
@echo "====> $@" | ||
mkdir -p $(DIR) | ||
cp $< $(DIR)/$(APPLICATION) | ||
cp README.md LICENSE $(DIR) | ||
tar -C $(PACKAGE_DIR) -cvzf $(PACKAGE_DIR)/$<.tar.gz $< | ||
rm -rf $(DIR) | ||
rm -rf $< | ||
|
||
.PHONY: install | ||
## install: install the application | ||
install: | ||
@echo "====> $@" | ||
go install -ldflags "$(LDFLAGS)" . | ||
|
||
.PHONY: run | ||
## run: runs go run main.go | ||
run: | ||
@echo "====> $@" | ||
go run -ldflags "$(LDFLAGS)" -race . | ||
|
||
.PHONY: clean | ||
## clean: cleans the binary | ||
clean: | ||
@echo "====> $@" | ||
rm -f $(APPLICATION)* | ||
go clean | ||
|
||
.PHONY: imports | ||
## imports: runs goimports | ||
imports: | ||
@echo "====> $@" | ||
goimports -local $(shell go list .) -w . | ||
|
||
.PHONY: lint | ||
## lint: runs golangci-lint | ||
lint: | ||
@echo "====> $@" | ||
golangci-lint run -E gosec -E goconst --timeout=15m ./... | ||
|
||
.PHONY: test | ||
## test: runs go test with default values | ||
test: | ||
@echo "====> $@" | ||
go test -ldflags "$(LDFLAGS)" -race ./... | ||
|
||
.PHONY: build-docker | ||
## build-docker: builds docker image to registry | ||
build-docker: build-linux | ||
@echo "====> $@" | ||
docker build -t ${APPLICATION}:${VERSION} . |