Skip to content

Commit

Permalink
rclone: sync to v1.62.2
Browse files Browse the repository at this point in the history
  • Loading branch information
l3v11 authored Apr 25, 2023
1 parent a974a66 commit 324a09b
Show file tree
Hide file tree
Showing 8 changed files with 235 additions and 885 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ name: build
on:
push:
tags:
- '*'
pull_request:
- '**'

jobs:
build:
if: ${{ github.event.inputs.manual == 'true' || (github.repository == 'l3v11/gclone' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name)) }}
timeout-minutes: 60
strategy:
fail-fast: false
Expand All @@ -22,29 +22,29 @@ jobs:
include:
- job_name: linux
os: ubuntu-latest
go: '1.19'
go: '1.20'
gotags: cmount
build_flags: '-include "^linux/" -exclude "^(linux/mips|linux/mipsle)"'
check: false
deploy: true

- job_name: mac_amd64
os: macos-11
go: '1.19'
go: '1.20'
gotags: 'cmount'
build_flags: '-include "^darwin/amd64" -cgo'
deploy: true

- job_name: mac_arm64
os: macos-11
go: '1.19'
go: '1.20'
gotags: 'cmount'
build_flags: '-include "^darwin/arm64" -cgo -macos-arch arm64 -cgo-cflags=-I/usr/local/include -cgo-ldflags=-L/usr/local/lib'
deploy: true

- job_name: windows
os: windows-latest
go: '1.19'
go: '1.20'
gotags: cmount
cgo: '0'
build_flags: '-include "^windows/"'
Expand All @@ -62,7 +62,7 @@ jobs:
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
check-latest: true
Expand All @@ -82,7 +82,7 @@ jobs:
sudo modprobe fuse
sudo chmod 666 /dev/fuse
sudo chown root:$USER /etc/fuse.conf
sudo apt-get install fuse libfuse-dev rpm pkg-config
sudo apt-get install fuse3 libfuse-dev rpm pkg-config
if: matrix.os == 'ubuntu-latest'

- name: Install Libraries on macOS
Expand Down Expand Up @@ -138,4 +138,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# working-directory: '$(modulePath)'
# Deploy binaries if enabled in config && not a PR && not a fork
if: matrix.deploy && github.head_ref == '' && github.repository == 'l3v11/gclone'
if: env.GITHUB_TOKEN != '' && matrix.deploy && github.head_ref == '' && github.repository == 'l3v11/gclone'
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.61.1
v1.62.2
14 changes: 9 additions & 5 deletions backend/drive/drive.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ If downloading a file returns the error "This file has been identified
as malware or spam and cannot be downloaded" with the error code
"cannotDownloadAbusiveFile" then supply this flag to rclone to
indicate you acknowledge the risks of downloading the file and rclone
will download it anyway.`,
will download it anyway.
Note that if you are using service account it will need Manager
permission (not Content Manager) to for this flag to work. If the SA
does not have the right permission, Google will just ignore the flag.`,
Advanced: true,
}, {
Name: "keep_revision_forever",
Expand Down Expand Up @@ -778,7 +782,7 @@ func (f *Fs) shouldRetry(ctx context.Context, err error) (bool, error) {
} else if f.opt.StopOnDownloadLimit && reason == "downloadQuotaExceeded" {
fs.Errorf(f, "Received download limit error: %v", err)
return false, fserrors.FatalError(err)
} else if f.opt.StopOnUploadLimit && reason == "quotaExceeded" {
} else if f.opt.StopOnUploadLimit && (reason == "quotaExceeded" || reason == "storageQuotaExceeded") {
fs.Errorf(f, "Received upload limit error: %v", err)
return false, fserrors.FatalError(err)
} else if f.opt.StopOnUploadLimit && reason == "teamDriveFileLimitExceeded" {
Expand Down Expand Up @@ -3463,9 +3467,9 @@ This takes an optional directory to trash which make this easier to
use via the API.
rclone backend untrash drive:directory
rclone backend -i untrash drive:directory subdir
rclone backend --interactive untrash drive:directory subdir
Use the -i flag to see what would be restored before restoring it.
Use the --interactive/-i or --dry-run flag to see what would be restored before restoring it.
Result:
Expand Down Expand Up @@ -3495,7 +3499,7 @@ component will be used as the file name.
If the destination is a drive backend then server-side copying will be
attempted if possible.
Use the -i flag to see what would be copied before copying.
Use the --interactive/-i or --dry-run flag to see what would be copied before copying.
`,
}, {
Name: "exportformats",
Expand Down
9 changes: 9 additions & 0 deletions backend/drive/drive_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ func (f *Fs) InternalTestShouldRetry(t *testing.T) {
quotaExceededRetry, quotaExceededError := f.shouldRetry(ctx, &generic403)
assert.False(t, quotaExceededRetry)
assert.Equal(t, quotaExceededError, expectedQuotaError)

sqEItem := googleapi.ErrorItem{
Reason: "storageQuotaExceeded",
}
generic403.Errors[0] = sqEItem
expectedStorageQuotaError := fserrors.FatalError(&generic403)
storageQuotaExceededRetry, storageQuotaExceededError := f.shouldRetry(ctx, &generic403)
assert.False(t, storageQuotaExceededRetry)
assert.Equal(t, storageQuotaExceededError, expectedStorageQuotaError)
}

func (f *Fs) InternalTestDocumentImport(t *testing.T) {
Expand Down
10 changes: 8 additions & 2 deletions bin/cross-compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@ var osarches = []string{
"linux/386",
"linux/amd64",
"linux/arm",
"linux/arm-v6",
"linux/arm-v7",
"linux/arm64",
"linux/mips",
"linux/mipsle",
"freebsd/386",
"freebsd/amd64",
"freebsd/arm",
"freebsd/arm-v6",
"freebsd/arm-v7",
"netbsd/386",
"netbsd/amd64",
"netbsd/arm",
"netbsd/arm-v6",
"netbsd/arm-v7",
"openbsd/386",
"openbsd/amd64",
Expand All @@ -82,13 +85,16 @@ var archFlags = map[string][]string{
"386": {"GO386=softfloat"},
"mips": {"GOMIPS=softfloat"},
"mipsle": {"GOMIPS=softfloat"},
"arm": {"GOARM=5"},
"arm-v6": {"GOARM=6"},
"arm-v7": {"GOARM=7"},
}

// Map Go architectures to NFPM architectures
// Any missing are passed straight through
var goarchToNfpm = map[string]string{
"arm": "arm6",
"arm": "arm5",
"arm-v6": "arm6",
"arm-v7": "arm7",
}

Expand Down Expand Up @@ -219,7 +225,7 @@ func buildWindowsResourceSyso(goarch string, versionTag string) string {
"StringFileInfo": M{
"CompanyName": "https://rclone.org",
"ProductName": "Rclone",
"FileDescription": "Rsync for cloud storage",
"FileDescription": "Rclone",
"InternalName": "rclone",
"OriginalFilename": "rclone.exe",
"LegalCopyright": "The Rclone Authors",
Expand Down
17 changes: 8 additions & 9 deletions bin/upload-github
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ if [ "$1" == "" ]; then
fi
VERSION="$1"

function create_release() {
cat > "/tmp/${VERSION}-release-notes" <<EOF
This is the ${VERSION} release of gclone.
EOF
Expand All @@ -24,14 +23,10 @@ echo "Making release ${VERSION} to repo ${REPO}"
gh release create "${VERSION}" \
--repo ${REPO} \
--title "gclone ${VERSION}" \
--notes-file "/tmp/${VERSION}-release-notes"
}
{
create_release
} || {
echo "Skipped release creation"
}
for build in build/*.zip build/version.txt; do
--notes-file "/tmp/${VERSION}-release-notes" \
--draft=true

for build in build/*; do
case $build in
*current*) continue ;;
esac
Expand All @@ -42,6 +37,10 @@ for build in build/*.zip build/version.txt; do
"${build}"
done

gh release edit "${VERSION}" \
--repo ${REPO} \
--draft=false

gh release view "${VERSION}" \
--repo ${REPO}

Expand Down
Loading

0 comments on commit 324a09b

Please sign in to comment.