Skip to content

Commit 5cda565

Browse files
author
yang.zhao
committed
fix ci
1 parent dff215c commit 5cda565

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Github Actions build for rclone
2+
# Github Actions build
33
# -*- compile-command: "yamllint -f parsable build.yml" -*-
44

55
name: build
@@ -21,7 +21,7 @@ on:
2121

2222
jobs:
2323
build:
24-
if: inputs.manual || (github.repository == 'rclone/rclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name))
24+
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
2525
timeout-minutes: 60
2626
defaults:
2727
run:
@@ -167,7 +167,16 @@ jobs:
167167
168168
- name: Rclone version
169169
run: |
170-
rclone version
170+
./rclone version
171+
172+
- name: Upload artifacts
173+
uses: actions/upload-artifact@v4
174+
with:
175+
name: rclone-${{ matrix.job_name }}
176+
path: |
177+
rclone
178+
rclone.exe
179+
if-no-files-found: ignore
171180

172181
- name: Run tests
173182
run: |
@@ -203,7 +212,7 @@ jobs:
203212
if: env.RCLONE_CONFIG_PASS != '' && matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'
204213

205214
lint:
206-
if: inputs.manual || (github.repository == 'rclone/rclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name))
215+
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
207216
timeout-minutes: 30
208217
name: "lint"
209218
runs-on: ubuntu-latest
@@ -300,7 +309,7 @@ jobs:
300309
if: github.event_name == 'pull_request'
301310

302311
android:
303-
if: inputs.manual || (github.repository == 'rclone/rclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name))
312+
if: inputs.manual || (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)
304313
timeout-minutes: 30
305314
name: "android-all"
306315
runs-on: ubuntu-latest

backend/baidu/baidu.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ const (
4444
uriQuota = "/api/quota"
4545

4646
//
47-
chunkSize = 4 * 1024 * 1024 //分片大小4M
48-
rapidUploadThreshold = 256 * 1024 //秒传阈值256KB
47+
chunkSize = 4 * 1024 * 1024 //分片大小4M
48+
rapidUploadThreshold = 256 * 1024 //秒传阈值256KB
4949
)
5050

5151
// Options defines the configuration for this backend
@@ -182,7 +182,7 @@ func (f *Fs) reWriteConfig() {
182182
if err != nil {
183183
t = time.Now()
184184
}
185-
sub := t.Sub(time.Now())
185+
sub := time.Until(t)
186186
if sub < 0 {
187187
sub = 5 * time.Minute
188188
}
@@ -794,8 +794,8 @@ func (o *Object) rapidUpload(ctx context.Context, remote, contentMD5, sliceMD5,
794794
RootURL: uploadUrl,
795795
Path: uriPCSFile,
796796
Parameters: map[string][]string{
797-
"method": {"rapidupload"},
798-
"path": {remote},
797+
"method": {"rapidupload"},
798+
"path": {remote},
799799
"content-length": {strconv.FormatInt(size, 10)},
800800
"content-md5": {contentMD5},
801801
"slice-md5": {sliceMD5},

0 commit comments

Comments
 (0)