Skip to content

Commit c7da084

Browse files
committedFeb 19, 2024
Fix containerized generation
1 parent 44086e9 commit c7da084

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed
 

‎Makefile

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IMAGE_NAME=golang:1.18
2-
export GOPROXY?=https://proxy.golang.org
2+
CONTAINER_ENGINE?=$(shell command -v docker 2>/dev/null || command -v podman 2>/dev/null)
33

44
default: \
55
generate \
@@ -10,19 +10,19 @@ reset-docs:
1010
generate:
1111
go run ./generator/app.go
1212

13-
generate-dockerized:
14-
docker run --rm -e WHAT -e GOPROXY -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app generate
13+
generate-containerized:
14+
$(CONTAINER_ENGINE) run --rm -e WHAT -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app generate
1515

1616
verify:
1717
@hack/verify.sh
1818

19-
verify-dockerized:
20-
docker run --rm -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app verify
19+
verify-containerized:
20+
$(CONTAINER_ENGINE) run --rm -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app verify
2121

2222
test:
2323
go test -v ./generator/...
2424

25-
test-dockerized:
26-
docker run --rm -v $(shell pwd):/go/src/app:Z $(IMAGE_NAME) make -C /go/src/app test
25+
test-containerized:
26+
$(CONTAINER_ENGINE) run --rm -v $(shell pwd):/go/src/app $(IMAGE_NAME) make -C /go/src/app test
2727

28-
.PHONY: default reset-docs generate generate-dockerized verify test test-dockerized
28+
.PHONY: default reset-docs generate generate-containerized verify verify-containerized test test-containerized

‎generator/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SIG Doc builder
22

33
This folder contains scripts to automatically generate documentation about the
4-
different Special Interest Groups (SIGs), Working Groups (WGs)
4+
different Special Interest Groups (SIGs), Working Groups (WGs)
55
and Committees of Kubernetes. The authoritative
66
source for SIG information is the [`sigs.yaml`](/sigs.yaml) file in the project root.
77
All updates must be done there.
@@ -49,9 +49,9 @@ To (re)build documentation for all the SIGs in a go environment, run:
4949
```bash
5050
make generate
5151
```
52-
or to run this inside a docker container:
52+
or to run this inside a container:
5353
```bash
54-
make generate-dockerized
54+
make generate-containerized
5555
```
5656

5757
To build docs for one SIG, run one of these commands:

‎hack/verify.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fi
3232
# Excluded check patterns are always skipped.
3333
EXCLUDED_PATTERNS=(
3434
"verify-all.sh" # this script calls the make rule and would cause a loop
35-
"verify-*-dockerized.sh" # Don't run any scripts that intended to be run dockerized
35+
"verify-*-containerized.sh" # Don't run any scripts that intended to be run containerized
3636
)
3737

3838
EXCLUDED_CHECKS=$(ls ${EXCLUDED_PATTERNS[@]/#/${KUBE_ROOT}\/hack\/} 2>/dev/null || true)

0 commit comments

Comments
 (0)
Please sign in to comment.