Skip to content

Commit 2580ef3

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/searxng
2 parents 5d2674b + a5cc4db commit 2580ef3

File tree

231 files changed

+14733
-3353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+14733
-3353
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: build
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: [ "main" ]
66

77
jobs:
88
build:
@@ -16,10 +16,5 @@ jobs:
1616
with:
1717
go-version-file: go.mod
1818

19-
- name: fmt
20-
run: |
21-
make fmt
22-
git diff --exit-code || (echo "::error::Code is not formatted. Run 'make fmt' and commit the changes." && exit 1)
23-
2419
- name: Build
2520
run: make build-all

.github/workflows/pr.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,48 +24,9 @@ jobs:
2424
with:
2525
version: v2.10.1
2626

27-
# TODO: Remove once linter is properly configured
28-
fmt-check:
29-
name: Formatting
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v6
34-
35-
- name: Setup Go
36-
uses: actions/setup-go@v6
37-
with:
38-
go-version-file: go.mod
39-
40-
- name: Check formatting
41-
run: |
42-
make fmt
43-
git diff --exit-code || (echo "::error::Code is not formatted. Run 'make fmt' and commit the changes." && exit 1)
44-
45-
# TODO: Remove once linter is properly configured
46-
vet:
47-
name: Vet
48-
runs-on: ubuntu-latest
49-
needs: fmt-check
50-
steps:
51-
- name: Checkout
52-
uses: actions/checkout@v6
53-
54-
- name: Setup Go
55-
uses: actions/setup-go@v6
56-
with:
57-
go-version-file: go.mod
58-
59-
- name: Run go generate
60-
run: go generate ./...
61-
62-
- name: Run go vet
63-
run: go vet ./...
64-
6527
test:
6628
name: Tests
6729
runs-on: ubuntu-latest
68-
needs: fmt-check
6930
steps:
7031
- name: Checkout
7132
uses: actions/checkout@v6

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ build/
1010
*.out
1111
/picoclaw
1212
/picoclaw-test
13-
cmd/picoclaw/workspace
13+
cmd/**/workspace
1414

1515
# Picoclaw specific
1616

.golangci.yaml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ linters:
2828
- wsl_v5
2929

3030
# TODO: Disabled, because they are failing at the moment, we should fix them and enable (step by step)
31-
- bodyclose
3231
- contextcheck
33-
- dogsled
3432
- embeddedstructfieldcheck
3533
- errcheck
3634
- errchkjson
@@ -45,33 +43,24 @@ linters:
4543
- gocritic
4644
- gocyclo
4745
- godox
48-
- goprintffuncname
4946
- gosec
50-
- govet
5147
- ineffassign
5248
- lll
5349
- maintidx
54-
- misspell
5550
- mnd
5651
- modernize
57-
- nakedret
5852
- nestif
5953
- nilnil
6054
- paralleltest
6155
- perfsprint
62-
- prealloc
63-
- predeclared
6456
- revive
6557
- staticcheck
6658
- tagalign
6759
- testifylint
6860
- thelper
6961
- unparam
70-
- unused
7162
- usestdlibvars
7263
- usetesting
73-
- wastedassign
74-
- whitespace
7564
settings:
7665
errcheck:
7766
check-type-assertions: true
@@ -153,19 +142,21 @@ linters:
153142
- gocognit
154143
- gocyclo
155144
path: _test\.go$
145+
- linters:
146+
- nolintlint
147+
path: 'pkg/tools/(i2c\.go|spi\.go)$'
156148

157149
issues:
158150
max-issues-per-linter: 0
159151
max-same-issues: 0
160152

161153
formatters:
162154
enable:
155+
- gci
156+
- gofmt
157+
- gofumpt
163158
- goimports
164-
# TODO: Disabled, because they are failing at the moment, we should fix them and enable (step by step)
165-
# - gci
166-
# - gofmt
167-
# - gofumpt
168-
# - golines
159+
- golines
169160
settings:
170161
gci:
171162
sections:

.goreleaser.yaml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ builds:
1515
- stdjson
1616
ldflags:
1717
- -s -w
18-
- -X main.version={{ .Version }}
19-
- -X main.gitCommit={{ .ShortCommit }}
20-
- -X main.buildTime={{ .Date }}
21-
- -X main.goVersion={{ .Env.GOVERSION }}
18+
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.version={{ .Version }}
19+
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.gitCommit={{ .ShortCommit }}
20+
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.buildTime={{ .Date }}
21+
- -X github.com/sipeed/picoclaw/cmd/picoclaw/internal.goVersion={{ .Env.GOVERSION }}
2222
goos:
2323
- linux
2424
- windows
@@ -28,9 +28,10 @@ builds:
2828
- amd64
2929
- arm64
3030
- riscv64
31-
- s390x
32-
- mips64
31+
- loong64
3332
- arm
33+
goarm:
34+
- "7"
3435
main: ./cmd/picoclaw
3536
ignore:
3637
- goos: windows
@@ -67,6 +68,25 @@ archives:
6768
- goos: windows
6869
formats: [zip]
6970

71+
nfpms:
72+
- id: picoclaw
73+
package_name: picoclaw
74+
file_name_template: >-
75+
{{ .PackageName }}_
76+
{{- if eq .Arch "amd64" }}x86_64
77+
{{- else if eq .Arch "arm64" }}aarch64
78+
{{- else if eq .Arch "arm" }}armv{{ .Arm }}
79+
{{- else }}{{ .Arch }}{{ end }}
80+
vendor: picoclaw
81+
homepage: https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/picoclaw
82+
maintainer: picoclaw contributors
83+
description: picoclaw - a tool for managing and running tasks
84+
license: MIT
85+
formats:
86+
- rpm
87+
- deb
88+
bindir: /usr/bin
89+
7090
changelog:
7191
sort: asc
7292
filters:

0 commit comments

Comments
 (0)