Skip to content

Commit

Permalink
chore: finish rename org
Browse files Browse the repository at this point in the history
Update remaining references to talos-systems missed by #220

Signed-off-by: Jack Kelly <[email protected]>
Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
06kellyjac authored and smira committed Jun 8, 2022
1 parent 625a1c5 commit 940b51e
Show file tree
Hide file tree
Showing 28 changed files with 137 additions and 237 deletions.
145 changes: 0 additions & 145 deletions .golangci-lint.yaml

This file was deleted.

16 changes: 13 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2021-12-16T15:13:36Z by kres 137a0e1.
# Generated on 2022-06-03T19:43:01Z by kres 65530e7.

# options for analysis running
run:
Expand Down Expand Up @@ -36,9 +36,16 @@ linters-settings:
lines: 60
statements: 40
gci:
local-prefixes: github.com/talos-systems/conform
local-prefixes: github.com/siderolabs/conform
gocognit:
min-complexity: 30
ireturn:
allow:
- anon
- error
- empty
- stdlib
- github.com\/talos-systems\/kres\/internal\/dag.Node
nestif:
min-complexity: 5
goconst:
Expand All @@ -58,7 +65,7 @@ linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/talos-systems/conform
local-prefixes: github.com/siderolabs/conform
golint:
min-confidence: 0.8
gomnd:
Expand Down Expand Up @@ -117,6 +124,7 @@ linters:
disable-all: false
fast: false
disable:
- exhaustruct
- exhaustivestruct
- forbidigo
- funlen
Expand All @@ -127,11 +135,13 @@ linters:
- goerr113
- gomnd
- gomoddirectives
- ireturn
- nestif
- paralleltest
- tagliatelle
- thelper
- typecheck
- varnamelen
- wrapcheck
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- interfacer
Expand Down
3 changes: 3 additions & 0 deletions .license-header.go.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
39 changes: 24 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-03-23T18:24:36Z by kres latest.
# Generated on 2022-06-03T19:43:01Z by kres 65530e7.

ARG TOOLCHAIN

Expand All @@ -14,14 +14,14 @@ FROM ghcr.io/siderolabs/ca-certificates:v1.0.0 AS image-ca-certificates
FROM ghcr.io/siderolabs/fhs:v1.0.0 AS image-fhs

# runs markdownlint
FROM node:14.8.0-alpine AS lint-markdown
RUN npm i -g [email protected]
RUN npm i [email protected]
FROM node:18.2.0-alpine AS lint-markdown
WORKDIR /src
RUN npm i -g [email protected]
RUN npm i [email protected]
COPY .markdownlint.json .
COPY ./CHANGELOG.md ./CHANGELOG.md
COPY ./README.md ./README.md
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules /node_modules/sentences-per-line/index.js .
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .

# base toolchain image
FROM ${TOOLCHAIN} AS toolchain
Expand All @@ -32,10 +32,17 @@ FROM toolchain AS tools
ENV GO111MODULE on
ENV CGO_ENABLED 0
ENV GOPATH /go
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b /bin v1.42.1
ARG GOLANGCILINT_VERSION
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCILINT_VERSION}/install.sh | bash -s -- -b /bin ${GOLANGCILINT_VERSION}
ARG GOFUMPT_VERSION
RUN go install mvdan.cc/gofumpt/gofumports@${GOFUMPT_VERSION} \
&& mv /go/bin/gofumports /bin/gofumports
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
&& mv /go/bin/gofumpt /bin/gofumpt
ARG GOIMPORTS_VERSION
RUN go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \
&& mv /go/bin/goimports /bin/goimports
ARG DEEPCOPY_VERSION
RUN go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
&& mv /go/bin/deep-copy /bin/deep-copy

# tools and sources
FROM tools AS base
Expand All @@ -52,7 +59,7 @@ RUN --mount=type=cache,target=/go/pkg go list -mod=readonly all >/dev/null
FROM base AS conform-darwin-amd64-build
COPY --from=generate / /
WORKDIR /src/cmd/conform
ARG VERSION_PKG="github.com/talos-systems/conform/internal/version"
ARG VERSION_PKG="github.com/siderolabs/conform/internal/version"
ARG SHA
ARG TAG
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=darwin go build -ldflags "-s -w -X ${VERSION_PKG}.Name=conform -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /conform-darwin-amd64
Expand All @@ -61,7 +68,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
FROM base AS conform-darwin-arm64-build
COPY --from=generate / /
WORKDIR /src/cmd/conform
ARG VERSION_PKG="github.com/talos-systems/conform/internal/version"
ARG VERSION_PKG="github.com/siderolabs/conform/internal/version"
ARG SHA
ARG TAG
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=darwin go build -ldflags "-s -w -X ${VERSION_PKG}.Name=conform -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /conform-darwin-arm64
Expand All @@ -70,7 +77,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
FROM base AS conform-linux-amd64-build
COPY --from=generate / /
WORKDIR /src/cmd/conform
ARG VERSION_PKG="github.com/talos-systems/conform/internal/version"
ARG VERSION_PKG="github.com/siderolabs/conform/internal/version"
ARG SHA
ARG TAG
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=amd64 GOOS=linux go build -ldflags "-s -w -X ${VERSION_PKG}.Name=conform -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /conform-linux-amd64
Expand All @@ -79,16 +86,18 @@ RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/g
FROM base AS conform-linux-arm64-build
COPY --from=generate / /
WORKDIR /src/cmd/conform
ARG VERSION_PKG="github.com/talos-systems/conform/internal/version"
ARG VERSION_PKG="github.com/siderolabs/conform/internal/version"
ARG SHA
ARG TAG
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOARCH=arm64 GOOS=linux go build -ldflags "-s -w -X ${VERSION_PKG}.Name=conform -X ${VERSION_PKG}.SHA=${SHA} -X ${VERSION_PKG}.Tag=${TAG}" -o /conform-linux-arm64

# runs gofumpt
FROM base AS lint-gofumpt
RUN find . -name '*.pb.go' | xargs -r rm
RUN find . -name '*.pb.gw.go' | xargs -r rm
RUN FILES="$(gofumports -l -local github.com/talos-systems/conform .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumports -w -local github.com/talos-systems/conform .':\n${FILES}"; exit 1)
RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'gofumpt -w .':\n${FILES}"; exit 1)

# runs goimports
FROM base AS lint-goimports
RUN FILES="$(goimports -l -local github.com/siderolabs/conform .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/conform .':\n${FILES}"; exit 1)

# runs golangci-lint
FROM base AS lint-golangci-lint
Expand Down
37 changes: 26 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2022-03-23T18:32:11Z by kres latest.
# Generated on 2022-06-03T19:43:01Z by kres 65530e7.

# common variables

Expand All @@ -11,14 +11,18 @@ ARTIFACTS := _out
REGISTRY ?= ghcr.io
USERNAME ?= siderolabs
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
GOFUMPT_VERSION ?= abc0db2c416aca0f60ea33c23c76665f6e7ba0b6
GO_VERSION ?= 1.17
PROTOBUF_GO_VERSION ?= 1.27.1
GRPC_GO_VERSION ?= 1.1.0
GRPC_GATEWAY_VERSION ?= 2.4.0
VTPROTOBUF_VERSION ?= 81d623a9a700ede8ef765e5ab08b3aa1f5b4d5a8
GOLANGCILINT_VERSION ?= v1.46.2
GOFUMPT_VERSION ?= v0.3.1
GO_VERSION ?= 1.18
GOIMPORTS_VERSION ?= v0.1.10
PROTOBUF_GO_VERSION ?= 1.28.0
GRPC_GO_VERSION ?= 1.2.0
GRPC_GATEWAY_VERSION ?= 2.10.0
VTPROTOBUF_VERSION ?= 0.3.0
DEEPCOPY_VERSION ?= v0.5.5
TESTPKGS ?= ./...
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest

# docker build settings

Expand All @@ -36,13 +40,16 @@ COMMON_ARGS += --build-arg=SHA=$(SHA)
COMMON_ARGS += --build-arg=TAG=$(TAG)
COMMON_ARGS += --build-arg=USERNAME=$(USERNAME)
COMMON_ARGS += --build-arg=TOOLCHAIN=$(TOOLCHAIN)
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION=$(GOLANGCILINT_VERSION)
COMMON_ARGS += --build-arg=GOFUMPT_VERSION=$(GOFUMPT_VERSION)
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION=$(GOIMPORTS_VERSION)
COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION=$(PROTOBUF_GO_VERSION)
COMMON_ARGS += --build-arg=GRPC_GO_VERSION=$(GRPC_GO_VERSION)
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION=$(GRPC_GATEWAY_VERSION)
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION=$(VTPROTOBUF_VERSION)
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION=$(DEEPCOPY_VERSION)
COMMON_ARGS += --build-arg=TESTPKGS=$(TESTPKGS)
TOOLCHAIN ?= docker.io/golang:1.17-alpine
TOOLCHAIN ?= docker.io/golang:1.18-alpine

# help menu

Expand Down Expand Up @@ -99,8 +106,11 @@ lint-gofumpt: ## Runs gofumpt linter.
fmt: ## Formats the source code
@docker run --rm -it -v $(PWD):/src -w /src golang:$(GO_VERSION) \
bash -c "export GO111MODULE=on; export GOPROXY=https://proxy.golang.org; \
go install mvdan.cc/gofumpt/gofumports@$(GOFUMPT_VERSION) && \
gofumports -w -local github.com/talos-systems/conform ."
go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && \
gofumpt -w ."

lint-goimports: ## Runs goimports linter.
@$(MAKE) target-$@

.PHONY: base
base: ## Prepare base toolchain
Expand Down Expand Up @@ -154,7 +164,7 @@ lint-markdown: ## Runs markdownlint.
@$(MAKE) target-$@

.PHONY: lint
lint: lint-golangci-lint lint-gofumpt lint-markdown ## Run all linters for the project.
lint: lint-golangci-lint lint-gofumpt lint-goimports lint-markdown ## Run all linters for the project.

.PHONY: image-conform
image-conform: ## Builds image for conform.
Expand All @@ -175,3 +185,8 @@ release-notes:
mkdir -p $(ARTIFACTS)
@ARTIFACTS=$(ARTIFACTS) ./hack/release.sh $@ $(ARTIFACTS)/RELEASE_NOTES.md $(TAG)

.PHONY: conformance
conformance:
@docker pull $(CONFORMANCE_IMAGE)
@docker run --rm -it -v $(PWD):/src -w /src $(CONFORMANCE_IMAGE) enforce

Loading

0 comments on commit 940b51e

Please sign in to comment.