Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
1105 Внедрение механизмов обеспечения безопасности цепочки поставки программных проектов
Legacy
scanned-projects
helm
Commits
12a8baef
Unverified
Commit
12a8baef
authored
6 years ago
by
Adam Reese
Browse files
Options
Download
Patches
Plain Diff
ref(Makefile): cleanup and consolidate
parent
61a9003a
main
Release
add-codeql
dependabot/go_modules/github.com/docker/distribution-2.8.2incompatible
dependabot/go_modules/github.com/lib/pq-1.10.9
dependabot/go_modules/github.com/rubenv/sql-migrate-1.4.0
dependabot/go_modules/golang.org/x/crypto-0.9.0
dependabot/go_modules/golang.org/x/term-0.8.0
dependabot/go_modules/k8s.io/klog/v2-2.100.1
feat-v3/event-emitter-lua
release-3.0
release-3.1
release-3.10
release-3.11
release-3.12
release-3.2
release-3.3
release-3.4
release-3.5
release-3.6
release-3.6.1
release-3.6.2
release-3.7
release-3.8
release-3.9
release-v3.0.0-beta.4
v3.12.0
v3.12.0-rc.1
v3.12.0-dev.1
v3.11.3
v3.11.2
v3.11.1
v3.11.0
v3.11.0-rc.2
v3.11.0-rc.1
v3.10.3
v3.10.2
v3.10.1
v3.10.0
v3.10.0-rc.1
v3.9.4
v3.9.3
v3.9.2
v3.9.1
v3.9.0
v3.9.0-rc.1
v3.8.2
v3.8.1
v3.8.0
v3.8.0-rc.2
v3.8.0-rc.1
v3.7.2
v3.7.1
v3.7.0
v3.7.0-rc.3
v3.7.0-rc.2
v3.7.0-rc.1
v3.6.3
v3.6.2
v3.6.1
v3.6.0
v3.6.0-rc.1
v3.5.4
v3.5.3
v3.5.2
v3.5.1
v3.5.0
v3.5.0-rc.2
v3.5.0-rc.1
v3.4.2
v3.4.1
v3.4.0
v3.4.0-rc.1
v3.3.4
v3.3.3
v3.3.2
v3.3.1
v3.3.0
v3.3.0-rc.2
v3.3.0-rc.1
v3.2.4
v3.2.3
v3.2.2
v3.2.1
v3.2.0
v3.2.0-rc.1
v3.1.3
v3.1.2
v3.1.1
v3.1.0
v3.1.0-rc.3
v3.1.0-rc.2
v3.1.0-rc.1
v3.0.3
v3.0.2
v3.0.1
v3.0.0
v3.0.0-rc.4
v3.0.0-rc.3
v3.0.0-rc.2
v3.0.0-rc.1
v3.0.0-beta.5
v3.0.0-beta.4
v3.0.0-beta.3
v3.0.0-beta.2
v3.0.0-beta.1
v3.0.0-alpha.2
v3.0.0-alpha.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+44
-21
Makefile
versioning.mk
+0
-28
versioning.mk
with
44 additions
and
49 deletions
+44
-49
Makefile
+
44
−
21
View file @
12a8baef
TARGETS
?=
darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64
DIST_DIRS
=
find
*
-type
d
-exec
APP
=
helm
BINDIR
:=
$(
CURDIR
)
/bin
DIST_DIRS
:
=
find
*
-type
d
-exec
TARGETS
:=
darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 linux/ppc64le windows/amd64
# go option
GO
?=
go
PKG
:=
$(
shell glide novendor
)
TAGS
:=
TESTS
:=
.
TESTFLAGS
:=
LDFLAGS
:=
-w
-s
GOFLAGS
:=
BINDIR
:=
$(
CURDIR
)
/bin
BINARIES
:=
helm
GO
?=
go
PKG
:=
./...
TAGS
:=
TESTS
:=
.
TESTFLAGS
:=
LDFLAGS
:=
-w
-s
GOFLAGS
:=
# Required for globs to work correctly
SHELL
=
/bin/bash
SHELL
=
/bin/bash
GIT_COMMIT
=
$(
shell git rev-parse HEAD
)
GIT_SHA
=
$(
shell git rev-parse
--short
HEAD
)
GIT_TAG
=
$(
shell git describe
--tags
--abbrev
=
0
--exact-match
2>/dev/null
)
GIT_DIRTY
=
$(
shell
test
-n
"
`
git status
--porcelain
`
"
&&
echo
"dirty"
||
echo
"clean"
)
ifdef
VERSION
BINARY_VERSION
=
$(
VERSION
)
endif
BINARY_VERSION
?=
${
GIT_TAG
}
# Only set Version if building a tag or VERSION is set
ifneq
($(BINARY_VERSION),)
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.Version
=
${
BINARY_VERSION
}
endif
# Clear the "unreleased" string in BuildMetadata
ifneq
($(GIT_TAG),)
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.BuildMetadata
=
endif
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.GitCommit
=
${
GIT_COMMIT
}
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.GitTreeState
=
${
GIT_DIRTY
}
.PHONY
:
all
all
:
build
.PHONY
:
build
build
:
GOBIN
=
$(
BINDIR
)
$(
GO
)
install
$(
GOFLAGS
)
-tags
'
$(
TAGS
)
'
-ldflags
'
$(
LDFLAGS
)
'
k8s.io/helm/cmd/
...
$(
GO
)
build
$(
GOFLAGS
)
-tags
'
$(
TAGS
)
'
-ldflags
'
$(
LDFLAGS
)
'
-o
$(
BINDIR
)
/helm
k8s.io/helm/cmd/
helm
# usage: make clean build-cross dist APP=helm|tiller VERSION=v2.0.0-alpha.3
.PHONY
:
build-cross
build-cross
:
LDFLAGS += -extldflags "-static"
build-cross
:
CGO_ENABLED
=
0 gox
-parallel
=
3
-output
=
"_dist/{{.OS}}-{{.Arch}}/{{.Dir}}"
-osarch
=
'
$(
TARGETS
)
'
$(
GOFLAGS
)
-tags
'
$(
TAGS
)
'
-ldflags
'
$(
LDFLAGS
)
'
k8s.io/helm/cmd/
$(
APP
)
CGO_ENABLED
=
0 gox
-parallel
=
3
-output
=
"_dist/{{.OS}}-{{.Arch}}/{{.Dir}}"
-osarch
=
'
$(
TARGETS
)
'
$(
GOFLAGS
)
-tags
'
$(
TAGS
)
'
-ldflags
'
$(
LDFLAGS
)
'
k8s.io/helm/cmd/
helm
.PHONY
:
dist
dist
:
...
...
@@ -84,16 +103,20 @@ HAS_GIT := $(shell command -v git;)
.PHONY
:
bootstrap
bootstrap
:
ifndef
HAS_GIT
$(
error You must
install
Git
)
endif
ifndef
HAS_GLIDE
go get
-u
github.com/Masterminds/glide
endif
ifndef
HAS_GOX
go get
-u
github.com/mitchellh/gox
endif
ifndef
HAS_GIT
$(
error
You must
install
Git
)
endif
glide
install
--strip-vendor
include
versioning.mk
.PHONY
:
info
info
:
@
echo
"Version:
${
VERSION
}
"
@
echo
"Git Tag:
${
GIT_TAG
}
"
@
echo
"Git Commit:
${
GIT_COMMIT
}
"
@
echo
"Git Tree State:
${
GIT_DIRTY
}
"
This diff is collapsed.
Click to expand it.
versioning.mk
deleted
100644 → 0
+
0
−
28
View file @
61a9003a
GIT_COMMIT
=
$(
shell git rev-parse HEAD
)
GIT_SHA
=
$(
shell git rev-parse
--short
HEAD
)
GIT_TAG
=
$(
shell git describe
--tags
--abbrev
=
0
--exact-match
2>/dev/null
)
GIT_DIRTY
=
$(
shell
test
-n
"
`
git status
--porcelain
`
"
&&
echo
"dirty"
||
echo
"clean"
)
ifdef
VERSION
BINARY_VERSION
=
$(
VERSION
)
endif
BINARY_VERSION
?=
${
GIT_TAG
}
# Only set Version if building a tag or VERSION is set
ifneq
($(BINARY_VERSION),)
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.Version
=
${
BINARY_VERSION
}
endif
# Clear the "unreleased" string in BuildMetadata
ifneq
($(GIT_TAG),)
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.BuildMetadata
=
endif
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.GitCommit
=
${
GIT_COMMIT
}
LDFLAGS
+=
-X
k8s.io/helm/pkg/version.GitTreeState
=
${
GIT_DIRTY
}
info
:
@
echo
"Version:
${
VERSION
}
"
@
echo
"Git Tag:
${
GIT_TAG
}
"
@
echo
"Git Commit:
${
GIT_COMMIT
}
"
@
echo
"Git Tree State:
${
GIT_DIRTY
}
"
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets