Skip to content

Commit 5d950ab

Browse files
authored
Merge pull request #48 from jkawamoto/hotfix/v0.7.2
Hotfix/v0.7.2
2 parents 26ab6d7 + 231c4be commit 5d950ab

File tree

17 files changed

+201
-265
lines changed

17 files changed

+201
-265
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.7.1
2+
current_version = 0.7.2
33
commit = True
44

55
[bumpversion:file:README.md]
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,21 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-go@v4
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-go@v5
1515
with:
1616
go-version: ">=1.20"
17-
- name: Install pre-commit
18-
run: pip install pre-commit
17+
- name: Run pre-commit hook
18+
uses: pre-commit/[email protected]
1919
- name: Run tests
2020
run: go test -race -coverprofile=coverage.out -covermode=atomic -v ./...
2121
- name: Upload coverage to Codecov
22-
uses: codecov/codecov-action@v3
23-
- name: Run lints
24-
run: pre-commit run --all-files
25-
- name: Run golangci-lint
26-
uses: golangci/golangci-lint-action@v3
27-
with:
28-
version: latest
29-
windows:
22+
uses: codecov/codecov-action@v4
23+
test-windows:
3024
runs-on: windows-latest
3125
steps:
32-
- uses: actions/checkout@v3
33-
- uses: actions/setup-go@v4
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-go@v5
3428
with:
3529
go-version: ">=1.20"
3630
- name: Run tests

.github/workflows/release.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,32 @@ jobs:
1212
release:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
16-
- uses: actions/setup-go@v4
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
1717
with:
1818
go-version: ">=1.20"
1919
- name: Run tests
2020
run: go test -v ./...
21-
- uses: goreleaser/goreleaser-action@v4
21+
- uses: goreleaser/goreleaser-action@v5
2222
with:
2323
version: latest
2424
args: release --clean
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
28+
29+
merge:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
ref: develop
35+
- name: Merge the new version into develop
36+
run: |
37+
git config user.name github-actions
38+
git config user.email [email protected]
39+
git fetch --tags origin
40+
git merge ${REF##*/}
41+
git push
42+
env:
43+
REF: ${{ github.event.push.ref }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.6.0
44
hooks:
55
- id: check-merge-conflict
66
- id: check-json
@@ -12,6 +12,6 @@ repos:
1212
- id: trailing-whitespace
1313
- id: detect-private-key
1414
- repo: https://github.com/golangci/golangci-lint
15-
rev: v1.52.2
15+
rev: v1.57.2
1616
hooks:
1717
- id: golangci-lint

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# A Pixeldrain client
22
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
3-
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml)
3+
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml)
44
[![Go Reference](https://pkg.go.dev/badge/github.com/jkawamoto/go-pixeldrain.svg)](https://pkg.go.dev/github.com/jkawamoto/go-pixeldrain)
55
[![codecov](https://codecov.io/gh/jkawamoto/go-pixeldrain/branch/master/graph/badge.svg?token=ppX3MVIqWA)](https://codecov.io/gh/jkawamoto/go-pixeldrain)
6-
[![Release](https://img.shields.io/badge/release-0.7.1-brightgreen.svg)](https://github.com/jkawamoto/go-pixeldrain/releases/tag/v0.7.1)
6+
[![Release](https://img.shields.io/badge/release-0.7.2-brightgreen.svg)](https://github.com/jkawamoto/go-pixeldrain/releases/tag/v0.7.2)
77

88

99
## Usage
@@ -95,7 +95,7 @@ To build the newest version, use go get command:
9595
$ go get github.com/jkawamoto/go-pixeldrain
9696
```
9797

98-
Otherwise, compiled binaries are also available in [Github](https://github.com/jkawamoto/go-pixeldrain/releases).
98+
Otherwise, compiled binaries are also available in [GitHub](https://github.com/jkawamoto/go-pixeldrain/releases).
9999

100100

101101
## License

client/user/list_file_lists_responses.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/user/list_files_responses.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/pd/command/download_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// download_test.go
22
//
3-
// Copyright (c) 2018-2023 Junpei Kawamoto
3+
// Copyright (c) 2018-2024 Junpei Kawamoto
44
//
55
// This software is released under the MIT License.
66
//
@@ -11,6 +11,7 @@ package command
1111
import (
1212
"bytes"
1313
"context"
14+
"errors"
1415
"flag"
1516
"io"
1617
"os"
@@ -276,7 +277,8 @@ func TestCmdDownload(t *testing.T) {
276277

277278
err = CmdDownload(c)
278279
if err != nil || tc.exit != 0 {
279-
if e, ok := err.(cli.ExitCoder); !ok {
280+
var e cli.ExitCoder
281+
if !errors.As(err, &e) {
280282
t.Errorf("expect an ExitCoder, got %v", err)
281283
} else if e.ExitCode() != tc.exit {
282284
t.Errorf("expect %v, got %v", tc.exit, e.ExitCode())

cmd/pd/command/mock/mock_service.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/pd/command/upload.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// upload.go
22
//
3-
// Copyright (c) 2018-2023 Junpei Kawamoto
3+
// Copyright (c) 2018-2024 Junpei Kawamoto
44
//
55
// This software is released under the MIT License.
66
//
@@ -189,6 +189,14 @@ func parseRecipientFile(name string) (_ []age.Recipient, err error) {
189189
}
190190

191191
func parseArgument(arg string) (path string, name string, _ error) {
192+
if strings.HasPrefix(arg, "-:") {
193+
name = strings.TrimPrefix(arg, "-:")
194+
if strings.HasPrefix(name, "\"") && strings.HasSuffix(name, "\"") {
195+
name = name[1 : len(name)-1]
196+
}
197+
return "-", name, nil
198+
}
199+
192200
volume := filepath.VolumeName(arg)
193201
arg = strings.TrimPrefix(arg, volume)
194202

0 commit comments

Comments
 (0)