Skip to content

Commit

Permalink
Merge branch 'master' into k8s_1_27_common
Browse files Browse the repository at this point in the history
  • Loading branch information
ranakan19 authored Oct 30, 2024
2 parents 007ae28 + 55e8143 commit 0fdbc00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @MatousJobanek @xcoulon @alexeykazakov @rajivnathan @ranakan19 @sbryzak @mfrancisc
* @MatousJobanek @xcoulon @alexeykazakov @rajivnathan @ranakan19 @mfrancisc
3 changes: 2 additions & 1 deletion make/clean.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.PHONY: clean
## runs go clean
clean:
$(Q)-rm -rf ${V_FLAG} $(OUT_DIR) ./vendor
$(Q)-rm -rf ${V_FLAG} $(OUT_DIR)
$(Q)go clean ${X_FLAG} ./...
11 changes: 5 additions & 6 deletions make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,26 @@ GO111MODULE?=on
export GO111MODULE

.PHONY: build
## Build
build: $(shell find . -path ./vendor -prune -o -name '*.go' -print)
## runs go build
build:
$(Q)CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \
go build ./...

.PHONY: vendor
vendor:
$(Q)go mod vendor

.PHONY: verify-dependencies
## Runs commands to verify after the updated dependecies of toolchain-common/API(go mod replace), if the repo needs any changes to be made
verify-dependencies: tidy vet build test lint-go-code

.PHONY: tidy
## runs go mod tidy
tidy:
go mod tidy

.PHONY: vet
## runs go mod vet ./...
vet:
go vet ./...

.PHONY: verify-replace-run
## downloads all the repos that depend on toolchain-common, installs the current version of the library and runs all the verifications in order to check for compatibility and breaking changes
verify-replace-run:
./scripts/verify-replace.sh;
4 changes: 4 additions & 0 deletions scripts/verify-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ do
git clone --depth=1 ${repo} ${repo_path}
echo "Repo cloned successfully"
cd ${repo_path}
if ! make pre-verify; then
ERRORLIST+="($(basename ${repo}))"
continue
fi
echo "Initiating 'go mod replace' of current toolchain common version in dependent repos"
go mod edit -replace github.com/codeready-toolchain/toolchain-common=${C_PATH}
make verify-dependencies || ERRORLIST+="($(basename ${repo}))"
Expand Down

0 comments on commit 0fdbc00

Please sign in to comment.