Skip to content

Commit d8dca42

Browse files
committed
Align files
1 parent 10ba35b commit d8dca42

10 files changed

Lines changed: 19 additions & 16 deletions

.cursor/rules/zz_generated.base-llm-rules.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ For detailed guidelines and examples, always refer to: @https://github.com/giant
5656
<!--
5757
DO NOT EDIT. Generated with devctl.
5858
This file is maintained at:
59-
https://github.com/giantswarm/devctl/blob/3bbd5cb47ff855f0b9c88881fbdcaa907d85647c/pkg/gen/input/llm/internal/file/base_llm_rules.mdc.template
59+
https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/llm/internal/file/base_llm_rules.mdc.template
6060
Manual changes will be overwritten.
6161
-->

.cursor/rules/zz_generated.go-llm-rules.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ When creating or modifying Go files, perform the according check and mitigate an
3030
<!--
3131
DO NOT EDIT. Generated with devctl.
3232
This file is maintained at:
33-
https://github.com/giantswarm/devctl/blob/83dbeb7aedca2abc8fd38c99e3cfa49f58d8ff82/pkg/gen/input/llm/internal/file/go_rules.mdc.template
33+
https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/llm/internal/file/go_rules.mdc.template
3434
Manual changes will be overwritten.
3535
-->

.github/workflows/zz_generated.create_release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/0df8c5e633bb1e4fd17c35525a7b382395526f22/pkg/gen/input/workflows/internal/file/create_release.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/create_release.yaml.template
66
#
77
name: Create Release
88

.github/workflows/zz_generated.create_release_pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/87f30fd3b955a0daf6017834a776c222d93a207c/pkg/gen/input/workflows/internal/file/create_release_pr.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/create_release_pr.yaml.template
66
#
77
name: Create Release PR
88
on:

.github/workflows/zz_generated.fix_vulnerabilities.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/6ff4d7652142f59436c1d1ef925f8d687e1ac671/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/fix_vulnerabilities.yaml.template
66
#
77

88
name: Fix Go vulnerabilities
@@ -14,11 +14,12 @@ on:
1414
inputs:
1515
branch:
1616
description: Branch on which to fix vulnerabilities
17+
default: main
1718
required: true
1819
type: string
1920
log_level:
2021
description: Log Level (info / error / debug)
21-
default: "info"
22+
default: info
2223
type: string
2324

2425
permissions: {}

.github/workflows/zz_generated.gitleaks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/87f30fd3b955a0daf6017834a776c222d93a207c/pkg/gen/input/workflows/internal/file/gitleaks.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/gitleaks.yaml.template
66
#
77
name: gitleaks
88

.github/workflows/zz_generated.run_ossf_scorecard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/4897b6ea0f98cfba54f8d3003f5bdcefb968a7b5/pkg/gen/input/workflows/internal/file/run_ossf_scorecard.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/run_ossf_scorecard.yaml.template
66
#
77

88
# This workflow uses actions that are not certified by GitHub. They are provided

.github/workflows/zz_generated.validate_changelog.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/87f30fd3b955a0daf6017834a776c222d93a207c/pkg/gen/input/workflows/internal/file/validate_changelog.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/workflows/internal/file/validate_changelog.yaml.template
66
#
77
name: Validate changelog
88

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/6a704f7e2a8b0f09e82b5bab88f17971af849711/pkg/gen/input/makefile/internal/file/Makefile.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/makefile/internal/file/Makefile.template
66
#
77

88
include Makefile.*.mk

Makefile.gen.go.mk

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
#
33
# devctl
44
#
5-
# https://github.com/giantswarm/devctl/blob/bf7f386ac6a4e807dde959892df1369fee6d789f/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template
5+
# https://github.com/giantswarm/devctl/blob/57c68171868158d915a92dd45201bbeadaa17214/pkg/gen/input/makefile/internal/file/Makefile.gen.go.mk.template
66
#
77

88
APPLICATION := $(shell go list -m | cut -d '/' -f 3)
99
BUILDTIMESTAMP := $(shell date -u '+%FT%TZ')
1010
GITSHA1 := $(shell git rev-parse --verify HEAD)
1111
MODULE := $(shell go list -m)
12+
# main() is usually in `main.go`, but sometimes in `cmd/main.go` (for example in newer kubebuilder projects)
13+
MAIN_SOURCE := $(shell if test -e cmd/main.go; then echo cmd/main.go; else echo main.go; fi)
1214
OS := $(shell go env GOOS)
1315
SOURCES := $(shell find . -name '*.go')
1416
VERSION := $(shell architect project version)
@@ -63,25 +65,25 @@ $(APPLICATION)-windows-amd64.exe: $(APPLICATION)-v$(VERSION)-windows-amd64.exe
6365

6466
$(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES)
6567
@echo "====> $@"
66-
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
68+
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
6769

6870
$(APPLICATION)-v$(VERSION)-%-arm64: $(SOURCES)
6971
@echo "====> $@"
70-
CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
72+
CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
7173

7274
$(APPLICATION)-v$(VERSION)-windows-amd64.exe: $(SOURCES)
7375
@echo "====> $@"
74-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
76+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
7577

7678
.PHONY: install
7779
install: ## Install the application.
7880
@echo "====> $@"
79-
go install -ldflags "$(LDFLAGS)" .
81+
go build -ldflags "$(LDFLAGS)" -o "$(shell go env GOPATH)/bin/$(APPLICATION)" "$(MAIN_SOURCE)"
8082

8183
.PHONY: run
8284
run: ## Runs go run main.go.
8385
@echo "====> $@"
84-
go run -ldflags "$(LDFLAGS)" -race .
86+
go run -ldflags "$(LDFLAGS)" -race "$(MAIN_SOURCE)"
8587

8688
.PHONY: clean
8789
clean: ## Cleans the binary.

0 commit comments

Comments
 (0)