Skip to content

Commit 853323a

Browse files
Merge pull request #1744 from cert-manager/self-upgrade-master
[CI] Merge self-upgrade-master into master
2 parents 605b9a0 + 867de3c commit 853323a

File tree

9 files changed

+66
-14
lines changed

9 files changed

+66
-14
lines changed

.github/workflows/make-self-upgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
self_upgrade:
1616
runs-on: ubuntu-latest
1717

18-
if: github.repository_owner == 'cert-manager'
18+
if: github.repository == 'cert-manager/website'
1919

2020
permissions:
2121
contents: write

klone.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,30 @@ targets:
1010
- folder_name: boilerplate
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
13+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
1414
repo_path: modules/boilerplate
1515
- folder_name: generate-verify
1616
repo_url: https://github.com/cert-manager/makefile-modules.git
1717
repo_ref: main
18-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
18+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
1919
repo_path: modules/generate-verify
2020
- folder_name: help
2121
repo_url: https://github.com/cert-manager/makefile-modules.git
2222
repo_ref: main
23-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
23+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
2424
repo_path: modules/help
2525
- folder_name: klone
2626
repo_url: https://github.com/cert-manager/makefile-modules.git
2727
repo_ref: main
28-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
28+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
2929
repo_path: modules/klone
3030
- folder_name: repository-base
3131
repo_url: https://github.com/cert-manager/makefile-modules.git
3232
repo_ref: main
33-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
33+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
3434
repo_path: modules/repository-base
3535
- folder_name: tools
3636
repo_url: https://github.com/cert-manager/makefile-modules.git
3737
repo_ref: main
38-
repo_hash: cf7f45d0a649834f3a8906ffef411bce03d09ac5
38+
repo_hash: 8837533393f5309a1f6ce4cc09641c26d50cef5d
3939
repo_path: modules/tools

make/00_mod.mk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright 2025 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
repo_name := github.com/cert-manager/website
16+
117
# Node and NPM are installed from the same source, so the versions must match
218
ADDITIONAL_TOOLS += node=v20.11.1
319
ADDITIONAL_TOOLS += npm=v20.11.1

make/02_mod.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
npm_scripts = build start dev check
216
.PHONY: $(npm_scripts)
317
$(npm_scripts): | $(NEEDS_NPM)

make/_shared/boilerplate/01_mod.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
license_base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
16+
1517
.PHONY: verify-boilerplate
1618
## Verify that all files have the correct boilerplate.
1719
## @category [shared] Generate/ Verify
1820
verify-boilerplate: | $(NEEDS_BOILERSUITE)
1921
$(BOILERSUITE) .
2022

2123
shared_verify_targets += verify-boilerplate
24+
25+
.PHONY: generate-license
26+
## Generate LICENSE file in the repository
27+
## @category [shared] Generate/ Verify
28+
generate-license:
29+
cp -r $(license_base_dir)/. ./
30+
31+
shared_generate_targets += generate-base
File renamed without changes.

make/_shared/repository-base/01_mod.mk

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,34 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
16-
base_dependabot_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base-dependabot/
15+
ifndef repo_name
16+
$(error repo_name is not set)
17+
endif
18+
19+
repository_base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
20+
repository_base_dependabot_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base-dependabot/
1721

1822
ifdef repository_base_no_dependabot
1923
.PHONY: generate-base
2024
## Generate base files in the repository
2125
## @category [shared] Generate/ Verify
2226
generate-base:
23-
cp -r $(base_dir)/. ./
27+
cp -r $(repository_base_dir)/. ./
28+
cd $(repository_base_dir) && \
29+
find . -type f | while read file; do \
30+
sed "s|{{REPLACE:GH-REPOSITORY}}|$(repo_name:github.com/%=%)|g" "$$file" > "$(CURDIR)/$$file"; \
31+
done
2432
else
2533
.PHONY: generate-base
2634
## Generate base files in the repository
2735
## @category [shared] Generate/ Verify
2836
generate-base:
29-
cp -r $(base_dir)/. ./
30-
cp -r $(base_dependabot_dir)/. ./
37+
cp -r $(repository_base_dir)/. ./
38+
cd $(repository_base_dir) && \
39+
find . -type f | while read file; do \
40+
sed "s|{{REPLACE:GH-REPOSITORY}}|$(repo_name:github.com/%=%)|g" "$$file" > "$(CURDIR)/$$file"; \
41+
done
42+
cp -r $(repository_base_dependabot_dir)/. ./
3143
endif
3244

3345
shared_generate_targets += generate-base

make/_shared/repository-base/base/.github/workflows/make-self-upgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
self_upgrade:
1616
runs-on: ubuntu-latest
1717

18-
if: github.repository_owner == 'cert-manager'
18+
if: github.repository == '{{REPLACE:GH-REPOSITORY}}'
1919

2020
permissions:
2121
contents: write

make/_shared/tools/00_mod.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ tools += controller-gen=v0.18.0
9393
# https://pkg.go.dev/golang.org/x/tools/cmd/goimports?tab=versions
9494
tools += goimports=v0.35.0
9595
# https://pkg.go.dev/github.com/google/go-licenses/v2?tab=versions
96-
tools += go-licenses=8c3708dd545a9faed3777bf50a3530ff8082180a
96+
tools += go-licenses=e4be799587800ffd119a1b419f13daf4989da546
9797
# https://pkg.go.dev/gotest.tools/gotestsum?tab=versions
9898
tools += gotestsum=v1.12.3
9999
# https://pkg.go.dev/sigs.k8s.io/kustomize/kustomize/v5?tab=versions

0 commit comments

Comments
 (0)