mirror of
https://github.com/labring/sealos.git
synced 2026-10-31 02:11:58 +08:00
* ci: use goreleaser to release docker images & deb and rpm packages, remove redundant make targets Signed-off-by: Mercurio <signormercurio@gmail.com> * publish deb and rpm packages Signed-off-by: Mercurio <signormercurio@gmail.com> * fix nfpms config error Signed-off-by: Mercurio <signormercurio@gmail.com> * adjust Dockerfile to match goreleaser Signed-off-by: Mercurio <signormercurio@gmail.com> * temporary comment out push to oss step Signed-off-by: Mercurio <signormercurio@gmail.com> * remove --rm-dist flag Signed-off-by: Mercurio <signormercurio@gmail.com> * attempt to fix publish package error Signed-off-by: Mercurio <signormercurio@gmail.com> * fix publish package error Signed-off-by: Mercurio <signormercurio@gmail.com> * fix publish package error Signed-off-by: Mercurio <signormercurio@gmail.com> * fix docker login credential error Signed-off-by: Mercurio <signormercurio@gmail.com> * remove sealctl from packages Signed-off-by: Mercurio <signormercurio@gmail.com> * remove sealctl from oss Signed-off-by: Mercurio <signormercurio@gmail.com>
56 lines
1.8 KiB
Makefile
56 lines
1.8 KiB
Makefile
# Copyright © 2022 sealos.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
BUILD_TOOLS ?= golangci-lint goimports addlicense deepcopy-gen conversion-gen upx
|
|
|
|
.PHONY: tools.install
|
|
tools.install: $(addprefix tools.install., $(BUILD_TOOLS))
|
|
|
|
.PHONY: tools.install.%
|
|
tools.install.%:
|
|
@echo "===========> Installing $*"
|
|
@$(MAKE) install.$*
|
|
|
|
.PHONY: tools.verify.%
|
|
tools.verify.%:
|
|
@if [ ! -f $(TOOLS_DIR)/$* ]; then GOBIN=$(TOOLS_DIR) $(MAKE) tools.install.$*; fi
|
|
|
|
.PHONY: install.golangci-lint
|
|
install.golangci-lint:
|
|
@$(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
|
|
.PHONY: install.goimports
|
|
install.goimports:
|
|
@$(GO) install golang.org/x/tools/cmd/goimports@latest
|
|
|
|
.PHONY: install.addlicense
|
|
install.addlicense:
|
|
@$(GO) install github.com/google/addlicense@latest
|
|
|
|
.PHONY: install.deepcopy-gen
|
|
install.deepcopy-gen:
|
|
@$(GO) install k8s.io/code-generator/cmd/deepcopy-gen@latest
|
|
|
|
.PHONY: install.conversion-gen
|
|
install.conversion-gen:
|
|
@$(GO) install k8s.io/code-generator/cmd/conversion-gen@latest
|
|
|
|
# upx platform is NOT relevant to cross-compiling platforms
|
|
.PHONY: install.upx
|
|
install.upx:
|
|
@wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-$(shell go env GOARCH)_$(GOOS).tar.xz
|
|
@tar xf upx*.tar.xz
|
|
@sudo cp upx*/upx $(TOOLS_DIR)
|
|
@rm -rf upx*
|