Skip to content

Commit 30b11a7

Browse files
authored
Merge pull request #198 from WillAbides/archives
update dependencies
2 parents c8a3f62 + 81358ab commit 30b11a7

31 files changed

+457
-344
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: WillAbides/setup-go-faster@v1
2020
id: setup-go
2121
with:
22-
go-version: '1.21.x'
22+
go-version: '1.23.5'
2323
- uses: actions/cache@v3
2424
with:
2525
path: |
@@ -43,7 +43,7 @@ jobs:
4343
- uses: WillAbides/setup-go-faster@v1
4444
id: setup-go
4545
with:
46-
go-version: '1.21.x'
46+
go-version: '1.23.5'
4747
- uses: actions/cache@v3
4848
with:
4949
path: |
@@ -61,7 +61,7 @@ jobs:
6161
- uses: WillAbides/setup-go-faster@v1
6262
id: setup-go
6363
with:
64-
go-version: '1.21.x'
64+
go-version: '1.23.5'
6565
- name: configure git
6666
run: |
6767
git config --global user.name 'github-actions[bot]'
@@ -90,7 +90,7 @@ jobs:
9090
- uses: WillAbides/setup-go-faster@v1
9191
id: setup-go
9292
with:
93-
go-version: '1.21.x'
93+
go-version: '1.23.5'
9494
- uses: actions/cache@v3
9595
with:
9696
path: |

.golangci.yml

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,52 @@ linters-settings:
3333
- style
3434
- diagnostic
3535
- performance
36+
- opinionated
37+
- experimental
3638
disabled-checks:
3739
- rangeValCopy
3840
- ptrToRefParam
41+
- hugeParam
42+
govet:
43+
enable-all: true
44+
disable:
45+
- fieldalignment
3946
errcheck:
4047
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
4148
# default is false: such cases aren't reported by default.
4249
check-blank: true
43-
govet:
44-
# report about shadowed variables
45-
check-shadowing: true
46-
maligned:
47-
# print struct with more effective memory layout or not, false by default
48-
suggest-new: true
50+
check-type-assertions: true
4951
revive:
5052
rules:
51-
- name: package-comments
52-
disabled: true
53+
# default rules:
54+
- name: var-declaration
55+
- name: dot-imports
56+
- name: blank-imports
57+
- name: indent-error-flow
58+
- name: range
59+
- name: errorf
60+
- name: error-naming
61+
- name: receiver-naming
62+
- name: increment-decrement
63+
- name: error-return
64+
- name: unexported-return
65+
- name: time-naming
66+
- name: context-keys-type
67+
- name: context-as-argument
68+
- name: empty-block
69+
- name: superfluous-else
70+
- name: unused-parameter
71+
- name: unreachable-code
72+
- name: redefines-builtin-id
73+
74+
# extra rules:
75+
- name: atomic
76+
- name: bare-return
77+
- name: bool-literal-in-expr
78+
- name: comment-spacings
79+
- name: constant-logical-expr
80+
- name: datarace
81+
- name: deep-exit
82+
- name: defer
83+
- name: early-return
84+
- name: import-shadowing

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ overrides:
297297
<!--- everything between the next line and the "end usage output" comment is generated by script/generate-readme --->
298298
<!--- start usage output --->
299299
```
300-
Usage: bindown <command>
300+
Usage: bindown <command> [flags]
301301
302302
Flags:
303303
-h, --help Show context-sensitive help.

bindown.schema.json

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@
3333
"description": "Whether to create a symlink to the bin instead of copying it."
3434
},
3535
"vars": {
36-
"patternProperties": {
37-
".*": {
38-
"type": "string"
39-
}
36+
"additionalProperties": {
37+
"type": "string"
4038
},
4139
"type": "object",
4240
"description": "A list of variables that can be used in 'url', 'archive_path' and 'bin'.\n\nTwo variables are always added based on the current environment: 'os' and 'arch'. Those are the operating\nsystem and architecture as defined by go's GOOS and GOARCH variables. I should document what those are\nsomewhere.\n\nYou can reference a variable using golang template syntax. For example, you could have a url set to\n`https://example.org/mydependency/v{{.version}}/mydependency-{{.os}}-{{.arch}}.tar.gz`. If you define the var\n'version: 1.2.3' and run bindown on a 64-bit Linux system, it will download\n`https://example.org/mydependency/v1.2.3/mydependency-linux-amd64.tar.gz`."
@@ -49,15 +47,11 @@
4947
"description": "Overrides allows you to override values depending on the os and architecture of the target system."
5048
},
5149
"substitutions": {
52-
"patternProperties": {
53-
".*": {
54-
"patternProperties": {
55-
".*": {
56-
"type": "string"
57-
}
58-
},
59-
"type": "object"
60-
}
50+
"additionalProperties": {
51+
"additionalProperties": {
52+
"type": "string"
53+
},
54+
"type": "object"
6155
},
6256
"type": "object",
6357
"description": "Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is\na map of substitutions. { \"os\": { \"linux\": \"Linux\", \"darwin\": \"MacOS\" } } is an example of a substitution that\nwill update the os variable."
@@ -83,13 +77,11 @@
8377
"DependencyOverride": {
8478
"properties": {
8579
"matcher": {
86-
"patternProperties": {
87-
".*": {
88-
"items": {
89-
"type": "string"
90-
},
91-
"type": "array"
92-
}
80+
"additionalProperties": {
81+
"items": {
82+
"type": "string"
83+
},
84+
"type": "array"
9385
},
9486
"type": "object",
9587
"description": "Limits the override to configurations matching all of the matchers. Keys may be \"os\", \"arch\" or any variable name.\nValues are an array of values to match. Any matching value will match. If a value can be interpreted as a\nsemantic version it will be treated as such."
@@ -125,10 +117,8 @@
125117
"description": "Whether to create a symlink to the bin instead of copying it."
126118
},
127119
"vars": {
128-
"patternProperties": {
129-
".*": {
130-
"type": "string"
131-
}
120+
"additionalProperties": {
121+
"type": "string"
132122
},
133123
"type": "object",
134124
"description": "A list of variables that can be used in 'url', 'archive_path' and 'bin'.\n\nTwo variables are always added based on the current environment: 'os' and 'arch'. Those are the operating\nsystem and architecture as defined by go's GOOS and GOARCH variables. I should document what those are\nsomewhere.\n\nYou can reference a variable using golang template syntax. For example, you could have a url set to\n`https://example.org/mydependency/v{{.version}}/mydependency-{{.os}}-{{.arch}}.tar.gz`. If you define the var\n'version: 1.2.3' and run bindown on a 64-bit Linux system, it will download\n`https://example.org/mydependency/v1.2.3/mydependency-linux-amd64.tar.gz`."
@@ -141,15 +131,11 @@
141131
"description": "Overrides allows you to override values depending on the os and architecture of the target system."
142132
},
143133
"substitutions": {
144-
"patternProperties": {
145-
".*": {
146-
"patternProperties": {
147-
".*": {
148-
"type": "string"
149-
}
150-
},
151-
"type": "object"
152-
}
134+
"additionalProperties": {
135+
"additionalProperties": {
136+
"type": "string"
137+
},
138+
"type": "object"
153139
},
154140
"type": "object",
155141
"description": "Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is\na map of substitutions. { \"os\": { \"linux\": \"Linux\", \"darwin\": \"MacOS\" } } is an example of a substitution that\nwill update the os variable."
@@ -176,37 +162,29 @@
176162
"description": "List of systems supported by this config. Systems are in the form of os/architecture."
177163
},
178164
"dependencies": {
179-
"patternProperties": {
180-
".*": {
181-
"$ref": "#/$defs/Dependency"
182-
}
165+
"additionalProperties": {
166+
"$ref": "#/$defs/Dependency"
183167
},
184168
"type": "object",
185169
"description": "Dependencies available for bindown to install."
186170
},
187171
"templates": {
188-
"patternProperties": {
189-
".*": {
190-
"$ref": "#/$defs/Dependency"
191-
}
172+
"additionalProperties": {
173+
"$ref": "#/$defs/Dependency"
192174
},
193175
"type": "object",
194176
"description": "Templates that can be used by dependencies in this file."
195177
},
196178
"template_sources": {
197-
"patternProperties": {
198-
".*": {
199-
"type": "string"
200-
}
179+
"additionalProperties": {
180+
"type": "string"
201181
},
202182
"type": "object",
203183
"description": "Upstream sources for templates."
204184
},
205185
"url_checksums": {
206-
"patternProperties": {
207-
".*": {
208-
"type": "string"
209-
}
186+
"additionalProperties": {
187+
"type": "string"
210188
},
211189
"type": "object",
212190
"description": "Checksums of downloaded files."

bindown.schema.yml

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ $defs:
2929
type: boolean
3030
description: Whether to create a symlink to the bin instead of copying it.
3131
vars:
32-
patternProperties:
33-
.*:
34-
type: string
32+
additionalProperties:
33+
type: string
3534
type: object
3635
description: |-
3736
A list of variables that can be used in 'url', 'archive_path' and 'bin'.
@@ -50,12 +49,10 @@ $defs:
5049
type: array
5150
description: Overrides allows you to override values depending on the os and architecture of the target system.
5251
substitutions:
53-
patternProperties:
54-
.*:
55-
patternProperties:
56-
.*:
57-
type: string
58-
type: object
52+
additionalProperties:
53+
additionalProperties:
54+
type: string
55+
type: object
5956
type: object
6057
description: |-
6158
Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is
@@ -76,11 +73,10 @@ $defs:
7673
DependencyOverride:
7774
properties:
7875
matcher:
79-
patternProperties:
80-
.*:
81-
items:
82-
type: string
83-
type: array
76+
additionalProperties:
77+
items:
78+
type: string
79+
type: array
8480
type: object
8581
description: |-
8682
Limits the override to configurations matching all of the matchers. Keys may be "os", "arch" or any variable name.
@@ -109,9 +105,8 @@ $defs:
109105
type: boolean
110106
description: Whether to create a symlink to the bin instead of copying it.
111107
vars:
112-
patternProperties:
113-
.*:
114-
type: string
108+
additionalProperties:
109+
type: string
115110
type: object
116111
description: |-
117112
A list of variables that can be used in 'url', 'archive_path' and 'bin'.
@@ -130,12 +125,10 @@ $defs:
130125
type: array
131126
description: Overrides allows you to override values depending on the os and architecture of the target system.
132127
substitutions:
133-
patternProperties:
134-
.*:
135-
patternProperties:
136-
.*:
137-
type: string
138-
type: object
128+
additionalProperties:
129+
additionalProperties:
130+
type: string
131+
type: object
139132
type: object
140133
description: |-
141134
Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is
@@ -162,27 +155,23 @@ properties:
162155
type: array
163156
description: List of systems supported by this config. Systems are in the form of os/architecture.
164157
dependencies:
165-
patternProperties:
166-
.*:
167-
$ref: '#/$defs/Dependency'
158+
additionalProperties:
159+
$ref: '#/$defs/Dependency'
168160
type: object
169161
description: Dependencies available for bindown to install.
170162
templates:
171-
patternProperties:
172-
.*:
173-
$ref: '#/$defs/Dependency'
163+
additionalProperties:
164+
$ref: '#/$defs/Dependency'
174165
type: object
175166
description: Templates that can be used by dependencies in this file.
176167
template_sources:
177-
patternProperties:
178-
.*:
179-
type: string
168+
additionalProperties:
169+
type: string
180170
type: object
181171
description: Upstream sources for templates.
182172
url_checksums:
183-
patternProperties:
184-
.*:
185-
type: string
173+
additionalProperties:
174+
type: string
186175
type: object
187176
description: Checksums of downloaded files.
188177
additionalProperties: false

bindown.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
golangci-lint:
2222
template: origin#golangci-lint
2323
vars:
24-
version: 1.54.2
24+
version: 1.63.4
2525
goreleaser:
2626
template: origin#goreleaser
2727
vars:
@@ -328,10 +328,10 @@ url_checksums:
328328
https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_macOS_amd64.zip: 6b91c446586935de0e9df82da58309b2d1b83061cfcd4cc173124270f1277ca7
329329
https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_macOS_arm64.zip: 32a71652367f3cf664894456e4c4f655faa95964d71cc3a449fbf64bdce1fff1
330330
https://github.com/cli/cli/releases/download/v2.30.0/gh_2.30.0_windows_amd64.zip: 7d466686978e3c93e1a412229a77921288862cec183e94ad06cd36bfcd34ebaf
331-
https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-darwin-amd64.tar.gz: 925c4097eae9e035b0b052a66d0a149f861e2ab611a4e677c7ffd2d4e05b9b89
332-
https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-darwin-arm64.tar.gz: 7b33fb1be2f26b7e3d1f3c10ce9b2b5ce6d13bb1d8468a4b2ba794f05b4445e1
333-
https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-linux-amd64.tar.gz: 17c9ca05253efe833d47f38caf670aad2202b5e6515879a99873fabd4c7452b3
334-
https://github.com/golangci/golangci-lint/releases/download/v1.54.2/golangci-lint-1.54.2-windows-amd64.zip: ce17d122f3f93e0a9e52009d2c03cc1c1a1ae28338c2702a1f53eccd10a1afa3
331+
https://github.com/golangci/golangci-lint/releases/download/v1.63.4/golangci-lint-1.63.4-darwin-amd64.tar.gz: 878d017cc360e4fb19510d39852c8189852e3c48e7ce0337577df73507c97d68
332+
https://github.com/golangci/golangci-lint/releases/download/v1.63.4/golangci-lint-1.63.4-darwin-arm64.tar.gz: a2b630c2ac8466393f0ccbbede4462387b6c190697a70bc2298c6d2123f21bbf
333+
https://github.com/golangci/golangci-lint/releases/download/v1.63.4/golangci-lint-1.63.4-linux-amd64.tar.gz: 01abb14a4df47b5ca585eff3c34b105023cba92ec34ff17212dbb83855581690
334+
https://github.com/golangci/golangci-lint/releases/download/v1.63.4/golangci-lint-1.63.4-windows-amd64.zip: 184d13c2b8f5441576bec2a0d8ba7b2d45445595cf796b879a73bcc98c39f8c1
335335
https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Darwin_arm64.tar.gz: 7eec9f4d0b86b2c9c9f6af1770a11315998bd4d4617633b0a73eeb036e97393e
336336
https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Darwin_x86_64.tar.gz: 95338eed333347152e23837b68a8c6ce0c62b9f5abb68bd5b4b08178766400b9
337337
https://github.com/goreleaser/goreleaser/releases/download/v1.18.2/goreleaser_Linux_x86_64.tar.gz: 811e0c63e347f78f3c8612a19ca8eeb564eb45f0265ce3f38aec39c8fdbcfa10

cmd/bindown/bootstrap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (c *bootstrapCmd) Run(ctx *runContext) error {
3232
return err
3333
}
3434
if c.Output == "" {
35-
fmt.Fprint(ctx.stdout, content)
35+
mustPrint(ctx.stdout, content)
3636
return nil
3737
}
3838
err = os.MkdirAll(filepath.Dir(c.Output), 0o755)

0 commit comments

Comments
 (0)