Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

fix(make): remove deprecated clean-backend and run go mod tidy in all modules #705

Merged
merged 5 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ DOCKER_REGISTRY ?= ghcr.io/openclarity
DOCKER_IMAGE ?= $(DOCKER_REGISTRY)/$(BINARY_NAME)
DOCKER_TAG ?= ${VERSION}
VMCLARITY_TOOLS_BASE ?=
GO_VERSION = 1.20

ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
BIN_DIR := $(ROOT_DIR)/bin

# Dependency versions
LICENSEI_VERSION = 0.5.0
LICENSEI_VERSION = 0.9.0

# HELP
# This will output the help for each task
Expand Down Expand Up @@ -140,8 +141,20 @@ e2e: docker-apiserver docker-cli docker-orchestrator docker-ui docker-ui-backend
clean-ui:
@(rm -rf ui/build ; echo "UI cleanup done" )

.PHONY: clean-golangci-lint
clean-golangci-lint:
@(rm -rf bin/golangci-lint* ; echo "Golangci lint cleanup done" )

.PHONY: clean-licensei
clean-licensei:
@(rm -rf bin/licensei* ; echo "Licensei cleanup done" )

.PHONY: clean-go
clean-go:
@(rm -rf bin/vmclarity* ; echo "GO executables cleanup done" )

.PHONY: clean
clean: clean-ui clean-backend ## Clean all build artifacts
clean: clean-ui clean-golangci-lint clean-licensei clean-go ## Clean all build artifacts

$(BIN_DIR):
@mkdir -p $(BIN_DIR)
Expand Down Expand Up @@ -201,9 +214,14 @@ license-cache: bin/licensei ## Generate license cache
.PHONY: check
check: lint test helm-lint ## Run tests and linters

TIDYGOMODULES = $(addprefix tidy-, $(GOMODULES))

.PHONY: $(TIDYGOMODULES)
$(TIDYGOMODULES):
cd $(dir $(@:tidy-%=%)) && go mod tidy -go=$(GO_VERSION)

.PHONY: gomod-tidy
gomod-tidy:
go mod tidy
gomod-tidy: $(TIDYGOMODULES)

.PHONY: gen-api
gen-api: gen-apiserver-api gen-uibackend-api ## Generating API code
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openclarity/vmclarity/api

go 1.19
go 1.20

require (
github.com/deepmap/oapi-codegen v1.12.3
Expand Down
8 changes: 4 additions & 4 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ To add a new test, create a new `<test_name>_test.go` file in the current direct
```go
var _ = ginkgo.Describe("<add a brief test case description>", func() {
reportFailedConfig := ReportFailedConfig{}
ginkgo.Context("<describe conditions or inputs>", func() {
ginkgo.Context("<describe conditions or inputs>", func() {
ginkgo.It("<describe the behaviour or feature being tested>", func(ctx ginkgo.SpecContext) {
<implement test code>
})
})
<implement test code>
})
})
ginkgo.AfterEach(func(ctx ginkgo.SpecContext) {
if ginkgo.CurrentSpecReport().Failed() {
reportFailedConfig.startTime = ginkgo.CurrentSpecReport().StartTime
Expand Down
Loading