FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
application-load-balancer-controller/Makefile at main · stackitcloud/application-load-balancer-controller · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackitcloud
/
application-load-balancer-controller
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
6
Code
Issues
1
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
application-load-balancer-controller
/
Makefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
91 lines (72 loc) · 2.69 KB
Breadcrumbs
application-load-balancer-controller
/
Makefile
Copy path
File metadata and controls
91 lines (72 loc) · 2.69 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
Setting SHELL to bash allows bash commands to be executed by recipes.
#
Options are set to exit when a recipe line exits non-zero or a piped command fails.
SHELL
= /usr/bin/env bash -o pipefail
.SHELLFLAGS
= -ec
NAME
:= application-load-balancer-controller
export
REPO
:= ghcr.io/stackitcloud
VERSION
?=
$(
shell
git describe --dirty --tags --match='v
*
' 2>/dev/null || git rev-parse --short HEAD)
export
TAG
:=
$(
VERSION
)
IS_DEV
?= true
ifeq
(
$(
IS_DEV
)
,true)
REPO_POSTFIX
:= -dev
#
Get current branch and replace invalid characters with hyphens for valid docker tagging
BRANCH_NAME
:=
$(
shell
git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9_.-]/-/g')
KO_TAGS
:=
$(
TAG
)
,
$(
BRANCH_NAME
)
else
KO_TAGS
:=
$(
TAG
)
,latest
endif
.PHONY
: all
all
: verify
#
#@ Tools
include
./hack/tools.mk
export
PUSH
?= false
.PHONY
: images
images
:
$(
KO
)
KO_DOCKER_REPO=
$(
REPO
)
/
$(
NAME
)$(
REPO_POSTFIX
)
$(
KO
)
build --push=
$(
PUSH
)
\
--image-label org.opencontainers.image.source=
"
https://github.com/stackitcloud/application-load-balancer-controller
"
\
--sbom none -t
$(
KO_TAGS
)
--bare
\
--platform linux/amd64,linux/arm64
\
./cmd/
$(
NAME
)
.PHONY
: clean-tools-bin
clean-tools-bin
:
#
# Empty the tools binary directory.
rm -rf
$(
TOOLS_BIN_DIR
)
/
*
$(
TOOLS_BIN_DIR
)
/.version_
*
.PHONY
: fmt
fmt
:
$(
GOIMPORTS_REVISER
)
#
# Run go fmt against code.
go fmt ./...
$(
GOIMPORTS_REVISER
)
.
.PHONY
: modules
modules
:
#
# Runs go mod to ensure modules are up to date.
go mod tidy
.PHONY
: test
test
:
$(
ENVTEST
)
#
# Run tests.
./hack/test.sh ./cmd/... ./pkg/...
.PHONY
: test-cover
test-cover
:
$(
ENVTEST
)
#
# Run tests with coverage.
go
test
-coverprofile cover.out ./...
go tool cover -html cover.out -o cover.html
#
#@ Verification
.PHONY
: lint
lint
:
$(
GOLANGCI_LINT
)
#
# Run golangci-lint against code.
$(
GOLANGCI_LINT
)
run ./...
.PHONY
: check
check
: lint test
#
# Check everything (lint + test).
.PHONY
: verify-fmt
verify-fmt
: fmt
#
# Verify go code is formatted.
@if
!
(git diff --quiet HEAD)
;
then
\
echo
"
unformatted files detected, please run 'make fmt'
"
;
exit
1
;
\
fi
.PHONY
: verify-modules
verify-modules
: modules
#
# Verify go module files are up to date.
@if
!
(git diff --quiet HEAD -- go.sum go.mod)
;
then
\
echo
"
go module files are out of date, please run 'make modules'
"
;
exit
1
;
\
fi
.PHONY
: verify-generate
verify-generate
: generate
#
# Verify go module files are up to date.
@if
!
(git diff --quiet HEAD)
;
then
\
echo
"
generate created a diff, please run 'make generate'
"
;
exit
1
;
\
fi
.PHONY
: verify
verify
: verify-fmt verify-modules verify-generate check
.PHONY
: generate
generate
:
go generate ./...
Back
|
FazBrowse Home
|
New Git URL