Remove go generate from scripts

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2025-07-30 23:40:32 +00:00 committed by Brad Davidson
parent 8fff7f573b
commit cb061687d4
7 changed files with 2 additions and 55 deletions

View file

@ -8,12 +8,6 @@ Before getting started, bear in mind that this repository includes all of Kubern
git clone --depth 1 https://github.com/k3s-io/k3s.git
```
The k3s build process requires some autogenerated code and remote artifacts that are not checked in to version control. To prepare these resources for your build environment, run:
```bash
mkdir -p build/data && make download && make generate
```
To build the full release binary, you may now run `make`, which will create `./dist/artifacts/k3s`.
To build the binaries using `make` without running linting (i.e.: if you have uncommitted changes):

View file

@ -1,5 +1,5 @@
TARGETS := $(shell ls scripts | grep -v \\.sh)
GO_FILES ?= $$(find . -name '*.go' | grep -v generated)
GO_FILES ?= $$(find . -name '*.go')
SHELL := /bin/bash
@ -77,4 +77,4 @@ local-airgap:
./scripts/package-airgap
.PHONY: local-ci
local-ci: local-binary local-image local-airgap
local-ci: local-binary local-image local-airgap

View file

@ -1,11 +0,0 @@
#!/bin/bash
cd $(dirname $0)/..
rm -rf build/data
mkdir -p build/data
GO=${GO-go}
echo Running: "${GO}" generate
"${GO}" generate

View file

@ -14,9 +14,6 @@ sha256sum -c install.sh.sha256sum
echo Running: go mod tidy
go mod tidy
echo Running: go generate
GOOS=linux CC=gcc CXX=g++ go generate
echo Running validation
. ./scripts/version.sh

View file

@ -1,10 +0,0 @@
#!/bin/bash
set -eux
./scripts/download >&2
go generate >&2
git diff
exit 0

View file

@ -76,13 +76,3 @@ targets:
- "scripts/airgap/image-list.txt"
matchpattern: 'docker.io/rancher/mirrored-coredns-coredns:\S+'
replacepattern: 'docker.io/rancher/mirrored-coredns-coredns:{{ source "coredns-docker-image" }}'
go-generate:
name: "Run go generate"
kind: "shell"
sourceid: "get-pwd"
spec:
command: '{{ source "get-pwd" }}/updatecli/scripts/run-go-generate.sh'
environments:
- name: PATH
- name: HOME

View file

@ -76,16 +76,3 @@ targets:
- "scripts/airgap/image-list.txt"
matchpattern: 'rancher/local-path-provisioner:v\d+\.\d+\.\d+(-\w+)?'
replacepattern: 'rancher/local-path-provisioner:{{ source `local-path-provisioner` }}'
go-generate:
name: "Run go generate"
kind: "shell"
scmid: "k3s"
dependson:
- "local-path-provisioner"
disablesourceinput: true
spec:
command: '{{ source "get-pwd" }}/updatecli/scripts/run-go-generate.sh'
environments:
- name: PATH
- name: HOME