Skip to content

Commit 6475b9a

Browse files
chore: align files according to platform standards
1 parent 10ba35b commit 6475b9a

7 files changed

Lines changed: 48 additions & 15 deletions

.github/workflows/zz_generated.create_release.yaml

Lines changed: 1 addition & 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/0df8c5e633bb1e4fd17c35525a7b382395526f22/pkg/gen/input/workflows/internal/file/create_release.yaml.template
5+
# https://github.com/giantswarm/devctl/blob/c4c2f6f84e7bc84f838669bce868465c16ae53fb/pkg/gen/input/workflows/internal/file/create_release.yaml.template
66
#
77
name: Create Release
88

@@ -22,7 +22,6 @@ jobs:
2222
create-release:
2323
uses: giantswarm/github-workflows/.github/workflows/create-release.yaml@main
2424
with:
25-
build-release-artifacts: false
2625
fetch-deep-gitlog-for-build: true
2726
secrets:
2827
TAYLORBOT_GITHUB_ACTION: ${{ secrets.TAYLORBOT_GITHUB_ACTION }}

.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/ce1c399b27e6055f53983b1fe953fe950416d15d/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/8d8b9dbd820fc286616891556b0ed5299130ee30/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: {}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# DO NOT EDIT. Generated with:
2+
#
3+
# devctl
4+
#
5+
# https://github.com/giantswarm/devctl/blob/814a91071850fc945ec1d58f92b761156ad7edb4/pkg/gen/input/workflows/internal/file/semantic_pull_request.yaml.template
6+
#
7+
name: semantic-pull-request
8+
9+
on:
10+
pull_request:
11+
types:
12+
- opened
13+
- edited
14+
- synchronize
15+
16+
permissions: {}
17+
18+
jobs:
19+
semantic-pull-request:
20+
uses: giantswarm/github-workflows/.github/workflows/semantic-pull-request.yaml@main
21+
permissions:
22+
pull-requests: read

.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
extends: default
3+
rules:
4+
comments:
5+
min-spaces-from-content: 1
6+
document-start: disable
7+
line-length:
8+
max: 200

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/b540873228e4a6d285984243a906c636ba70e0be/pkg/gen/input/makefile/internal/file/Makefile.template
66
#
77

88
include Makefile.*.mk

Makefile.gen.go.mk

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@
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/0a4b91f4aa7d4eceff967a333eadac0286a526b3/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')
14-
VERSION := $(shell architect project version)
16+
VERSION := $(shell gitsemver get)
1517
ifeq ($(OS), linux)
1618
EXTLDFLAGS := -static
1719
endif
1820
LDFLAGS ?= -w -linkmode 'auto' -extldflags '$(EXTLDFLAGS)' \
19-
-X '$(shell go list -m)/pkg/project.buildTimestamp=${BUILDTIMESTAMP}' \
20-
-X '$(shell go list -m)/pkg/project.gitSHA=${GITSHA1}'
21+
-X '$(MODULE)/pkg/project.version=$(VERSION)' \
22+
-X '$(MODULE)/pkg/project.buildTimestamp=$(BUILDTIMESTAMP)' \
23+
-X '$(MODULE)/pkg/project.gitSHA=$(GITSHA1)'
2124

2225
.DEFAULT_GOAL := build
2326

@@ -63,25 +66,25 @@ $(APPLICATION)-windows-amd64.exe: $(APPLICATION)-v$(VERSION)-windows-amd64.exe
6366

6467
$(APPLICATION)-v$(VERSION)-%-amd64: $(SOURCES)
6568
@echo "====> $@"
66-
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
69+
CGO_ENABLED=0 GOOS=$* GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
6770

6871
$(APPLICATION)-v$(VERSION)-%-arm64: $(SOURCES)
6972
@echo "====> $@"
70-
CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
73+
CGO_ENABLED=0 GOOS=$* GOARCH=arm64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
7174

7275
$(APPLICATION)-v$(VERSION)-windows-amd64.exe: $(SOURCES)
7376
@echo "====> $@"
74-
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ .
77+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(LDFLAGS)" -o $@ "$(MAIN_SOURCE)"
7578

7679
.PHONY: install
7780
install: ## Install the application.
7881
@echo "====> $@"
79-
go install -ldflags "$(LDFLAGS)" .
82+
go build -ldflags "$(LDFLAGS)" -o "$(shell go env GOPATH)/bin/$(APPLICATION)" "$(MAIN_SOURCE)"
8083

8184
.PHONY: run
8285
run: ## Runs go run main.go.
8386
@echo "====> $@"
84-
go run -ldflags "$(LDFLAGS)" -race .
87+
go run -ldflags "$(LDFLAGS)" -race "$(MAIN_SOURCE)"
8588

8689
.PHONY: clean
8790
clean: ## Cleans the binary.

0 commit comments

Comments
 (0)