Skip to content

Commit 4909ec3

Browse files
committed
1 parent d0ad6be commit 4909ec3

File tree

7 files changed

+181
-226
lines changed

7 files changed

+181
-226
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: ci
2+
env:
3+
commit_msg: ""
24
on:
35
push:
46
branches:
@@ -22,7 +24,7 @@ jobs:
2224
steps:
2325
# Checkout code
2426
- name: Checkout repository
25-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2628

2729
# Configure runner environment
2830
- name: Set up runner environment
@@ -35,7 +37,7 @@ jobs:
3537
- name: Set up Go
3638
uses: actions/setup-go@v4
3739
with:
38-
go-version: 1.20.x
40+
go-version: 1.21.x
3941

4042
# Get commit message
4143
- name: Get commit message
@@ -73,14 +75,14 @@ jobs:
7375
needs: scan
7476
strategy:
7577
matrix:
76-
go-version: [1.19.x, 1.20.x]
78+
go-version: [1.19.x, 1.20.x, 1.21.x]
7779
os: [ubuntu-latest]
7880
runs-on: ${{ matrix.os }}
7981
timeout-minutes: 15
8082
steps:
8183
# Checkout code
8284
- name: Checkout repository
83-
uses: actions/checkout@v3
85+
uses: actions/checkout@v4
8486

8587
# Configure runner environment
8688
- name: Set up runner environment
@@ -107,7 +109,7 @@ jobs:
107109
- name: Static analysis
108110
uses: golangci/golangci-lint-action@v3
109111
with:
110-
version: v1.51.2
112+
version: v1.54.2
111113

112114
# Run unit tests
113115
- name: Test

.github/workflows/codeql.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: "codeQL"
2+
env:
3+
commit_msg: ""
24
on:
35
push:
46
branches:
@@ -21,7 +23,7 @@ jobs:
2123
steps:
2224
# Checkout code
2325
- name: Checkout repository
24-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2527

2628
# Get commit message
2729
- name: Get commit message

.github/workflows/publish.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: publish
2+
env:
3+
commit_msg: ""
24
on:
35
push:
46
tags:
@@ -15,11 +17,11 @@ jobs:
1517
- name: Set up Go
1618
uses: actions/setup-go@v4
1719
with:
18-
go-version: 1.20.x
20+
go-version: 1.21.x
1921

2022
# Checkout code
2123
- name: Checkout repository
22-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2325
# This is required for the changelog to be properly generated
2426
with:
2527
fetch-depth: 0
@@ -38,26 +40,14 @@ jobs:
3840
git log --format=%B -n 1 ${{ github.sha }} >> $GITHUB_ENV
3941
echo 'EOF' >> $GITHUB_ENV
4042
41-
# If "vendor" is in cache, restore.
42-
# To run conditional steps use:
43-
# if: steps.vendor-cache.outputs.cache-hit != 'true'
44-
- name: Restore modules from cache
45-
id: vendor-cache
46-
uses: actions/cache@v3
47-
env:
48-
cache-name: vendor
49-
with:
50-
path: ./vendor
51-
key: ${{ env.cache-name }}-${{ hashFiles('go.sum') }}
52-
5343
# Use goreleaser to create the new release
5444
# https://github.com/goreleaser/goreleaser-action
5545
- name: Create release
56-
uses: goreleaser/goreleaser-action@v4
46+
uses: goreleaser/goreleaser-action@v5
5747
if: startsWith(github.ref, 'refs/tags/') && !contains(env.commit_msg, '[skip release]')
5848
with:
5949
version: latest
60-
args: release --rm-dist --skip-validate
50+
args: release --clean --skip=validate
6151
env:
6252
# https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow
6353
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ linters:
2525
- typecheck
2626
- gocyclo
2727
- goconst
28-
- depguard
2928
- misspell
3029
- lll
3130
- nakedret
@@ -55,6 +54,7 @@ linters:
5554
- deadcode
5655
- unused
5756
- dupl
57+
- depguard
5858
# https://github.com/golangci/golangci-lint/issues/2649
5959
- structcheck
6060
- wastedassign

.goreleaser.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ builds:
1919
# code entrypoint
2020
main: ./cli/main.go
2121
# CLI flags for the 'go build' command
22-
flags:
23-
-v
22+
flags: -v
2423
ldflags:
2524
- -s -w
2625
- -X github.com/bryk-io/serve/internal.CoreVersion={{.Version}}
@@ -61,7 +60,7 @@ archives:
6160
# include documentation files in the package for distribution
6261
- README.md
6362
- LICENSE*
64-
- src: '*.md'
63+
- src: "*.md"
6564
dst: docs
6665
strip_parent: true
6766
# generate integrity checksums
@@ -81,7 +80,7 @@ snapshot:
8180
# https://goreleaser.com/customization/release/#customize-the-changelog
8281
changelog:
8382
# Sorts the changelog by the commit messages (asc, desc or '')
84-
sort: ''
83+
sort: ""
8584
# Remove certain commit messages from the changelog
8685
filters:
8786
# Standard commit messages can help to produce better changelogs
@@ -94,21 +93,20 @@ changelog:
9493
# Produce homebrew formulas for the project artifacts
9594
# https://goreleaser.com/customization/homebrew/
9695
brews:
97-
-
98-
# Formula name
96+
- # Formula name
9997
name: serve
10098
# Push the formula to the tap repository
10199
skip_upload: "false"
102100
# TAP repository
103-
tap:
101+
repository:
104102
owner: bryk-io
105103
name: homebrew-tap
106104
# Use 'github-actions' as commit author
107105
# https://github.community/t/github-actions-bot-email-address/17204
108106
commit_author:
109107
name: github-actions
110108
email: 41898282+github-actions[bot]@users.noreply.github.com
111-
homepage: 'https://github.com/bryk-io/tred-cli'
109+
homepage: "https://github.com/bryk-io/tred-cli"
112110
description: |
113111
Simple file system HTTP server
114112
install: |
@@ -123,8 +121,7 @@ brews:
123121
# linux packages
124122
# https://goreleaser.com/customization/nfpm/
125123
nfpms:
126-
-
127-
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
124+
- file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
128125
builds:
129126
- serve
130127
vendor: Bryk Labs

go.mod

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ go 1.18
44

55
require (
66
github.com/spf13/cobra v1.7.0
7-
github.com/spf13/viper v1.16.0
8-
go.bryk.io/pkg v0.0.0-20230726005736-9113c4947926
7+
github.com/spf13/viper v1.17.0
8+
go.bryk.io/pkg v0.0.0-20231014020804-767c6db4f19f
99
)
1010

1111
require (
1212
github.com/beorn7/perks v1.0.1 // indirect
1313
github.com/briandowns/spinner v1.23.0 // indirect
1414
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
1515
github.com/cespare/xxhash/v2 v2.2.0 // indirect
16-
github.com/fatih/color v1.13.0 // indirect
16+
github.com/fatih/color v1.15.0 // indirect
1717
github.com/felixge/httpsnoop v1.0.3 // indirect
1818
github.com/fsnotify/fsnotify v1.6.0 // indirect
19-
github.com/getsentry/sentry-go v0.22.0 // indirect
19+
github.com/getsentry/sentry-go v0.25.0 // indirect
2020
github.com/go-logr/logr v1.2.4 // indirect
2121
github.com/go-logr/stdr v1.2.2 // indirect
2222
github.com/go-ole/go-ole v1.2.6 // indirect
@@ -25,62 +25,63 @@ require (
2525
github.com/gorilla/websocket v1.5.0 // indirect
2626
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
2727
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
28-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
28+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
2929
github.com/hashicorp/hcl v1.0.0 // indirect
3030
github.com/inconshreveable/mousetrap v1.1.0 // indirect
3131
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
3232
github.com/magiconair/properties v1.8.7 // indirect
3333
github.com/mattn/go-colorable v0.1.13 // indirect
34-
github.com/mattn/go-isatty v0.0.17 // indirect
34+
github.com/mattn/go-isatty v0.0.19 // indirect
3535
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
3636
github.com/mitchellh/mapstructure v1.5.0 // indirect
37-
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
37+
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
3838
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
39-
github.com/prometheus/client_golang v1.16.0 // indirect
40-
github.com/prometheus/client_model v0.4.0 // indirect
41-
github.com/prometheus/common v0.42.0 // indirect
42-
github.com/prometheus/procfs v0.10.1 // indirect
43-
github.com/rs/zerolog v1.29.1 // indirect
44-
github.com/shirou/gopsutil/v3 v3.23.4 // indirect
45-
github.com/shoenig/go-m1cpu v0.1.5 // indirect
39+
github.com/prometheus/client_golang v1.17.0 // indirect
40+
github.com/prometheus/client_model v0.5.0 // indirect
41+
github.com/prometheus/common v0.44.0 // indirect
42+
github.com/prometheus/procfs v0.11.1 // indirect
43+
github.com/rs/zerolog v1.31.0 // indirect
44+
github.com/sagikazarmark/locafero v0.3.0 // indirect
45+
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
46+
github.com/shirou/gopsutil/v3 v3.23.8 // indirect
47+
github.com/shoenig/go-m1cpu v0.1.6 // indirect
4648
github.com/sirupsen/logrus v1.9.3 // indirect
4749
github.com/soheilhy/cmux v0.1.5 // indirect
48-
github.com/spf13/afero v1.9.5 // indirect
50+
github.com/sourcegraph/conc v0.3.0 // indirect
51+
github.com/spf13/afero v1.10.0 // indirect
4952
github.com/spf13/cast v1.5.1 // indirect
50-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
5153
github.com/spf13/pflag v1.0.5 // indirect
52-
github.com/subosito/gotenv v1.4.2 // indirect
53-
github.com/tklauser/go-sysconf v0.3.11 // indirect
54-
github.com/tklauser/numcpus v0.6.0 // indirect
55-
github.com/yusufpapurcu/wmi v1.2.2 // indirect
56-
go.opentelemetry.io/contrib/instrumentation/host v0.42.0 // indirect
57-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0 // indirect
58-
go.opentelemetry.io/contrib/instrumentation/runtime v0.42.0 // indirect
59-
go.opentelemetry.io/otel v1.16.0 // indirect
60-
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect
61-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.39.0 // indirect
62-
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.39.0 // indirect
63-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect
64-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.16.0 // indirect
65-
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.39.0 // indirect
66-
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.16.0 // indirect
67-
go.opentelemetry.io/otel/metric v1.16.0 // indirect
68-
go.opentelemetry.io/otel/sdk v1.16.0 // indirect
69-
go.opentelemetry.io/otel/sdk/metric v0.39.0 // indirect
70-
go.opentelemetry.io/otel/trace v1.16.0 // indirect
71-
go.opentelemetry.io/proto/otlp v0.19.0 // indirect
72-
go.uber.org/atomic v1.9.0 // indirect
54+
github.com/subosito/gotenv v1.6.0 // indirect
55+
github.com/tklauser/go-sysconf v0.3.12 // indirect
56+
github.com/tklauser/numcpus v0.6.1 // indirect
57+
github.com/yusufpapurcu/wmi v1.2.3 // indirect
58+
go.opentelemetry.io/contrib/instrumentation/host v0.45.0 // indirect
59+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect
60+
go.opentelemetry.io/contrib/instrumentation/runtime v0.45.0 // indirect
61+
go.opentelemetry.io/otel v1.19.0 // indirect
62+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect
63+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect
64+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
65+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
66+
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.42.0 // indirect
67+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.19.0 // indirect
68+
go.opentelemetry.io/otel/metric v1.19.0 // indirect
69+
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
70+
go.opentelemetry.io/otel/sdk/metric v1.19.0 // indirect
71+
go.opentelemetry.io/otel/trace v1.19.0 // indirect
72+
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
7373
go.uber.org/multierr v1.11.0 // indirect
74-
go.uber.org/zap v1.24.0 // indirect
75-
golang.org/x/net v0.12.0 // indirect
76-
golang.org/x/sync v0.3.0 // indirect
77-
golang.org/x/sys v0.10.0 // indirect
78-
golang.org/x/term v0.10.0 // indirect
79-
golang.org/x/text v0.11.0 // indirect
74+
go.uber.org/zap v1.26.0 // indirect
75+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
76+
golang.org/x/net v0.17.0 // indirect
77+
golang.org/x/sync v0.4.0 // indirect
78+
golang.org/x/sys v0.13.0 // indirect
79+
golang.org/x/term v0.13.0 // indirect
80+
golang.org/x/text v0.13.0 // indirect
8081
golang.org/x/time v0.3.0 // indirect
81-
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect
82-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
83-
google.golang.org/grpc v1.56.2 // indirect
82+
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
83+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
84+
google.golang.org/grpc v1.58.3 // indirect
8485
google.golang.org/protobuf v1.31.0 // indirect
8586
gopkg.in/ini.v1 v1.67.0 // indirect
8687
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)