Skip to content

Commit 12d2e21

Browse files
authored
Merge pull request #199 from WillAbides/revert-198-archives
Revert "update dependencies"
2 parents 30b11a7 + d7d0271 commit 12d2e21

31 files changed

+344
-457
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.23.5'
22+
go-version: '1.21.x'
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.23.5'
46+
go-version: '1.21.x'
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.23.5'
64+
go-version: '1.21.x'
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.23.5'
93+
go-version: '1.21.x'
9494
- uses: actions/cache@v3
9595
with:
9696
path: |

.golangci.yml

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,52 +33,20 @@ linters-settings:
3333
- style
3434
- diagnostic
3535
- performance
36-
- opinionated
37-
- experimental
3836
disabled-checks:
3937
- rangeValCopy
4038
- ptrToRefParam
41-
- hugeParam
42-
govet:
43-
enable-all: true
44-
disable:
45-
- fieldalignment
4639
errcheck:
4740
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
4841
# default is false: such cases aren't reported by default.
4942
check-blank: true
50-
check-type-assertions: 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
5149
revive:
5250
rules:
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
51+
- name: package-comments
52+
disabled: true

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> [flags]
300+
Usage: bindown <command>
301301
302302
Flags:
303303
-h, --help Show context-sensitive help.

bindown.schema.json

Lines changed: 49 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
"description": "Whether to create a symlink to the bin instead of copying it."
3434
},
3535
"vars": {
36-
"additionalProperties": {
37-
"type": "string"
36+
"patternProperties": {
37+
".*": {
38+
"type": "string"
39+
}
3840
},
3941
"type": "object",
4042
"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`."
@@ -47,11 +49,15 @@
4749
"description": "Overrides allows you to override values depending on the os and architecture of the target system."
4850
},
4951
"substitutions": {
50-
"additionalProperties": {
51-
"additionalProperties": {
52-
"type": "string"
53-
},
54-
"type": "object"
52+
"patternProperties": {
53+
".*": {
54+
"patternProperties": {
55+
".*": {
56+
"type": "string"
57+
}
58+
},
59+
"type": "object"
60+
}
5561
},
5662
"type": "object",
5763
"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."
@@ -77,11 +83,13 @@
7783
"DependencyOverride": {
7884
"properties": {
7985
"matcher": {
80-
"additionalProperties": {
81-
"items": {
82-
"type": "string"
83-
},
84-
"type": "array"
86+
"patternProperties": {
87+
".*": {
88+
"items": {
89+
"type": "string"
90+
},
91+
"type": "array"
92+
}
8593
},
8694
"type": "object",
8795
"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."
@@ -117,8 +125,10 @@
117125
"description": "Whether to create a symlink to the bin instead of copying it."
118126
},
119127
"vars": {
120-
"additionalProperties": {
121-
"type": "string"
128+
"patternProperties": {
129+
".*": {
130+
"type": "string"
131+
}
122132
},
123133
"type": "object",
124134
"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`."
@@ -131,11 +141,15 @@
131141
"description": "Overrides allows you to override values depending on the os and architecture of the target system."
132142
},
133143
"substitutions": {
134-
"additionalProperties": {
135-
"additionalProperties": {
136-
"type": "string"
137-
},
138-
"type": "object"
144+
"patternProperties": {
145+
".*": {
146+
"patternProperties": {
147+
".*": {
148+
"type": "string"
149+
}
150+
},
151+
"type": "object"
152+
}
139153
},
140154
"type": "object",
141155
"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."
@@ -162,29 +176,37 @@
162176
"description": "List of systems supported by this config. Systems are in the form of os/architecture."
163177
},
164178
"dependencies": {
165-
"additionalProperties": {
166-
"$ref": "#/$defs/Dependency"
179+
"patternProperties": {
180+
".*": {
181+
"$ref": "#/$defs/Dependency"
182+
}
167183
},
168184
"type": "object",
169185
"description": "Dependencies available for bindown to install."
170186
},
171187
"templates": {
172-
"additionalProperties": {
173-
"$ref": "#/$defs/Dependency"
188+
"patternProperties": {
189+
".*": {
190+
"$ref": "#/$defs/Dependency"
191+
}
174192
},
175193
"type": "object",
176194
"description": "Templates that can be used by dependencies in this file."
177195
},
178196
"template_sources": {
179-
"additionalProperties": {
180-
"type": "string"
197+
"patternProperties": {
198+
".*": {
199+
"type": "string"
200+
}
181201
},
182202
"type": "object",
183203
"description": "Upstream sources for templates."
184204
},
185205
"url_checksums": {
186-
"additionalProperties": {
187-
"type": "string"
206+
"patternProperties": {
207+
".*": {
208+
"type": "string"
209+
}
188210
},
189211
"type": "object",
190212
"description": "Checksums of downloaded files."

bindown.schema.yml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ $defs:
2929
type: boolean
3030
description: Whether to create a symlink to the bin instead of copying it.
3131
vars:
32-
additionalProperties:
33-
type: string
32+
patternProperties:
33+
.*:
34+
type: string
3435
type: object
3536
description: |-
3637
A list of variables that can be used in 'url', 'archive_path' and 'bin'.
@@ -49,10 +50,12 @@ $defs:
4950
type: array
5051
description: Overrides allows you to override values depending on the os and architecture of the target system.
5152
substitutions:
52-
additionalProperties:
53-
additionalProperties:
54-
type: string
55-
type: object
53+
patternProperties:
54+
.*:
55+
patternProperties:
56+
.*:
57+
type: string
58+
type: object
5659
type: object
5760
description: |-
5861
Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is
@@ -73,10 +76,11 @@ $defs:
7376
DependencyOverride:
7477
properties:
7578
matcher:
76-
additionalProperties:
77-
items:
78-
type: string
79-
type: array
79+
patternProperties:
80+
.*:
81+
items:
82+
type: string
83+
type: array
8084
type: object
8185
description: |-
8286
Limits the override to configurations matching all of the matchers. Keys may be "os", "arch" or any variable name.
@@ -105,8 +109,9 @@ $defs:
105109
type: boolean
106110
description: Whether to create a symlink to the bin instead of copying it.
107111
vars:
108-
additionalProperties:
109-
type: string
112+
patternProperties:
113+
.*:
114+
type: string
110115
type: object
111116
description: |-
112117
A list of variables that can be used in 'url', 'archive_path' and 'bin'.
@@ -125,10 +130,12 @@ $defs:
125130
type: array
126131
description: Overrides allows you to override values depending on the os and architecture of the target system.
127132
substitutions:
128-
additionalProperties:
129-
additionalProperties:
130-
type: string
131-
type: object
133+
patternProperties:
134+
.*:
135+
patternProperties:
136+
.*:
137+
type: string
138+
type: object
132139
type: object
133140
description: |-
134141
Substitutions will substitute values from vars. The key is the name of the variable to substitute. The value is
@@ -155,23 +162,27 @@ properties:
155162
type: array
156163
description: List of systems supported by this config. Systems are in the form of os/architecture.
157164
dependencies:
158-
additionalProperties:
159-
$ref: '#/$defs/Dependency'
165+
patternProperties:
166+
.*:
167+
$ref: '#/$defs/Dependency'
160168
type: object
161169
description: Dependencies available for bindown to install.
162170
templates:
163-
additionalProperties:
164-
$ref: '#/$defs/Dependency'
171+
patternProperties:
172+
.*:
173+
$ref: '#/$defs/Dependency'
165174
type: object
166175
description: Templates that can be used by dependencies in this file.
167176
template_sources:
168-
additionalProperties:
169-
type: string
177+
patternProperties:
178+
.*:
179+
type: string
170180
type: object
171181
description: Upstream sources for templates.
172182
url_checksums:
173-
additionalProperties:
174-
type: string
183+
patternProperties:
184+
.*:
185+
type: string
175186
type: object
176187
description: Checksums of downloaded files.
177188
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.63.4
24+
version: 1.54.2
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.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
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
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-
mustPrint(ctx.stdout, content)
35+
fmt.Fprint(ctx.stdout, content)
3636
return nil
3737
}
3838
err = os.MkdirAll(filepath.Dir(c.Output), 0o755)

0 commit comments

Comments
 (0)