Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ah/chore/update #8

Merged
merged 52 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3e08061
readme: fix `ci` badge URL (#546)
igungor Feb 2, 2023
f0ce87d
command: use external sort for comparison in sync (#483)
kucukaslan Jun 16, 2023
0993c6d
command/storage: add versioning support (#475)
kucukaslan Jun 16, 2023
3efbbe8
.github/workflows: Add external endpoint test before release (#508)
boraberke Jun 19, 2023
439061f
readme: clarify `specifying credentials` section (#570)
igungor Jun 19, 2023
fa8f356
Bump go module version to v2 (#556)
justinmanley Jun 20, 2023
9005f76
readme: update build from source instruction (#574)
igungor Jul 2, 2023
168781a
all: get rid of `testify` package (#577)
igungor Jul 2, 2023
74d21bb
changelog: v2.1.0 is released (#572)
igungor Jul 2, 2023
bb3723b
command/sync: fix delete option with empty target (#578)
seruman Jul 6, 2023
2487d6f
command: update misleading help descriptions (#581)
denizsurmeli Jul 10, 2023
af8d725
CHANGELOG: add bugfix entry for #576 (#588)
seruman Jul 10, 2023
6ac390f
command: fix file overriding when download fails (#479) (#582)
ahmethakanbesel Jul 13, 2023
7006118
ls: add `--show-fullpath` flag (#599)
denizsurmeli Jul 20, 2023
ef362f3
e2e/run: update racy test case (#606)
ahmethakanbesel Jul 21, 2023
4f54f64
ls: update `--show-fullpath` flag (#601)
denizsurmeli Jul 24, 2023
ac09d28
command: add `content-disposition` flag. (#589)
denizsurmeli Jul 24, 2023
21d2501
changelog: add a bug fix entry for #479 (#610)
ahmethakanbesel Jul 24, 2023
2f6e9da
fix: remove debug lines (#614)
denizsurmeli Jul 25, 2023
24c89b1
goreleaser: add ppc64le support (#552)
mgiessing Jul 25, 2023
4218176
.github/workflows/ci: run on push/pr against master branch (#605)
seruman Jul 25, 2023
bbc13fd
.github/workflows/ci: bump staticcheck to v0.4.3 (#612)
seruman Jul 25, 2023
4292ecc
cat: make it concurrent (#593)
denizsurmeli Jul 27, 2023
18145bd
command: add pipe command (#182)(#587)
ahmethakanbesel Jul 27, 2023
8bbd960
command/cp: add progress bar (#590)
ahmethakanbesel Jul 27, 2023
71cdc2e
readme: add instructions on how to install on FreeBSD (#573)
ehaupt Jul 27, 2023
20d6a22
github/workflows: Drop EOL versions and added latest 1.20 (#583)
jpds Jul 27, 2023
065c3cf
storage/s3: enable `ListObjectsV2` for GCS (#617)
igungor Jul 28, 2023
f9453a4
all: min Go version is 1.19, build with 1.20 (#622)
igungor Jul 28, 2023
f758adf
storage,command: handle `Stat()` errors (#620)
igungor Jul 28, 2023
987b4ae
feat: dependabot workflow automation for updating dependency (#530)
Rajpratik71 Jul 31, 2023
cb948fa
command/sync: handle object listing errors (#597)
ahmethakanbesel Aug 4, 2023
393e8dd
command: skip nonregular files (#618)
ahmethakanbesel Aug 4, 2023
5bb45b6
context: put quotes around flagvalue incase of whitespaced values (#636)
ataberkgrl Aug 7, 2023
4c30eb3
command/sync: add `--include` flag (#600)
ahmethakanbesel Aug 8, 2023
f75c262
progressbar: remove duplicate assertions (#638)
ahmethakanbesel Aug 8, 2023
ab52b9c
github/dependabot: create security fix PRs only (#639)
igungor Aug 8, 2023
c24cc52
readme: add integrity verification section (#616)
ahmethakanbesel Aug 18, 2023
6a1ea3c
command: add `presign` command (#634)
zemul Aug 21, 2023
f58add9
readme: update filters section (#642)
ahmethakanbesel Aug 21, 2023
b7babaf
command/pipe: add more examples (#643)
ahmethakanbesel Aug 21, 2023
db6b53f
command: add arbitrary metadata support to `cp` and `pipe` (#621)
denizsurmeli Aug 21, 2023
336eb28
changelog,command/presign: add missing points, fix cosmetic issues fo…
igungor Aug 21, 2023
a115f0c
command: extend `select` api support (#611)
denizsurmeli Aug 21, 2023
63d2e7c
changelog: prepare for `v2.2.0` release (#645)
igungor Aug 21, 2023
045fa7e
goreleaser: fix `go-version` value (#646)
igungor Aug 21, 2023
550a846
github/goreleaser: pin `goreleaser` version to release s5cmd v2.2.0 (…
igungor Aug 21, 2023
be63977
makefile: correctly inject vcs information into the binary (#650)
igungor Aug 23, 2023
10e4ccf
changelog: prepare `v2.2.1` release (#652)
igungor Aug 23, 2023
48f7e59
cp,pipe: don't omit some of the metadata flags (#658)
denizsurmeli Sep 15, 2023
1631a0d
update go report url to match module name (#664)
kucukaslan Sep 20, 2023
c1c7ee3
dockerfile: use Alpine 3.18 as base for release image (#661)
embik Oct 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
# Dependencies listed in go.mod
- package-ecosystem: "gomod"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
# Create security fix PRs only
open-pull-requests-limit: 0


# Dependencies listed in .github/workflows/*.yml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Create security fix PRs only
open-pull-requests-limit: 0
36 changes: 28 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: ci
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
go-version:
- 1.20.x
- 1.19.x
- 1.18.x
- 1.17.x
os:
- macos
- ubuntu
Expand All @@ -27,29 +32,42 @@ jobs:
strategy:
matrix:
go-version:
- 1.20.x
- 1.19.x
- 1.18.x
- 1.17.x
os:
- macos
- ubuntu
- windows

name: test (${{ matrix.os }}/go-${{ matrix.go-version }})
runs-on: ${{ matrix.os }}-latest
services:
minio:
image: ${{ (matrix.os == 'ubuntu') && 'bitnami/minio:2023.7.18' || ''}}
ports:
- 45677:9000
options: >-
--health-cmd "curl -I http://localhost:9000/minio/health/live -s"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- run: make test

env:
S5CMD_TEST_ENDPOINT_URL: ${{ (matrix.os == 'ubuntu') && 'http://localhost:45677' || '' }}
qa:
strategy:
matrix:
go-version:
- 1.19.x
- 1.20.x
os:
- ubuntu

Expand All @@ -61,8 +79,10 @@ jobs:
go-version: ${{ matrix.go-version }}

- run: make check-fmt
- run: go install github.com/golang/mock/[email protected]
- run: make check-codegen
- run: make vet
- run: go install honnef.co/go/tools/cmd/staticcheck@v0.3.0
- run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.3
- run: make staticcheck
- run: go install mvdan.cc/unparam@latest
- run: make unparam
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7,linux/386
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v6,linux/arm/v7,linux/386
tags: |
peakcom/s5cmd:latest
peakcom/s5cmd:${{ github.event.release.tag_name }}
22 changes: 20 additions & 2 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@ on:
tags:
- 'v*'
jobs:
gcs_test:
name: gcs-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.20.x
- run: make test_without_race
env:
S5CMD_ACCESS_KEY_ID: ${{ secrets.S5CMD_GCS_ACCESS_KEY_ID }}
S5CMD_SECRET_ACCESS_KEY: ${{ secrets.S5CMD_GCS_SECRET_ACCESS_KEY }}
S5CMD_ENDPOINT_URL: https://storage.googleapis.com
S5CMD_IS_VIRTUAL_HOST: 1
S5CMD_REGION: ${{ secrets.S5CMD_GCS_REGION }}
S5CMD_I_KNOW_WHAT_IM_DOING: 1

goreleaser:
needs: [ gcs_test ]
runs-on: ubuntu-latest
steps:
-
Expand All @@ -16,12 +34,12 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
go-version: '1.20'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
version: '1.18.2'
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ before:
builds:
-
binary: s5cmd
ldflags: -s -w -X github.com/peak/s5cmd/version.Version={{.Tag}} -X github.com/peak/s5cmd/version.GitCommit={{ .ShortCommit }}
ldflags: -s -w -X github.com/peak/s5cmd/v2/version.Version={{.Tag}} -X github.com/peak/s5cmd/v2/version.GitCommit={{ .ShortCommit }}
env:
- CGO_ENABLED=0
goos:
Expand All @@ -16,6 +16,7 @@ builds:
- amd64
- arm
- arm64
- ppc64le
ignore:
- goos: darwin
goarch: 386
Expand Down
48 changes: 46 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
# Changelog
## v2.2.2 - 13 Sep 2023

## not released yet
#### Bugfixes
- Fixed `cp` and `pipe` to not omit some of the metadata flags. ([#657](https://github.com/peak/s5cmd/issues/657))
## v2.2.1 - 23 Aug 2023

#### Bugfixes
- Fixed incorrect `s5cmd version` output ([#650](https://github.com/peak/s5cmd/pull/650))
## v2.2.0 - 21 Aug 2023

#### Features
- Added `pipe` command. ([#182](https://github.com/peak/s5cmd/issues/182))
- Added `presign` command. ([#634](https://github.com/peak/s5cmd/pull/634)) [@zemul](https://github.com/zemul)
- Added file types to `select` queries with more range of options to set during the query. ([#494](https://github.com/peak/s5cmd/issues/494))
- Added `--content-disposition` flag to `cp` command. ([#569](https://github.com/peak/s5cmd/issues/569))
- Added `--show-fullpath` flag to `ls` command. ([#596](https://github.com/peak/s5cmd/issues/596))
- Added `--show-progress` flag to `cp` command. ([#51](https://github.com/peak/s5cmd/issues/51))
- Added `--metadata` flag to `cp` and `pipe` commands to set arbitrary metadata for the objects. ([#537](https://github.com/peak/s5cmd/issues/537))
- Added `--include` flag to `cp`, `rm`, and `sync` commands. ([#516](https://github.com/peak/s5cmd/issues/516))
- Added `--content-disposition` flag to `cp` command. ([#569](https://github.com/peak/s5cmd/issues/569))


#### Improvements
- Implemented concurrent multipart download support for `cat` command. ([#245](https://github.com/peak/s5cmd/issues/245))
- Upgraded minimum required Go version to 1.19. ([#583](https://github.com/peak/s5cmd/pull/583))
- `ListObjectsV2` S3 API is enabled for Google Cloud Storage. ([#617](https://github.com/peak/s5cmd/pull/617))
- Added installation instructions for FreeBSD. ([#573](https://github.com/peak/s5cmd/pull/573)) [@ehaupt](https://github.com/ehaupt)
- Added `ppc64le` support. ([#552](https://github.com/peak/s5cmd/pull/552)) [@mgiessing](https://github.com/mgiessing)

#### Bugfixes
- Fixed a bug that causes `sync` command with whitespaced flag value to fail. ([#541](https://github.com/peak/s5cmd/issues/541)) [ataberkgrl](https://github.com/ataberkgrl)
- Fixed a bug introduced with `external sort` support in `sync` command which prevents `sync` to an empty destination with `--delete` option. ([#576](https://github.com/peak/s5cmd/issues/576))
- Fixed a bug in `sync` command, which previously caused the command to continue running even if an error was received from the destination bucket. ([#564](https://github.com/peak/s5cmd/issues/564))
- Fixed a bug that causes local files to be lost if downloads fail. ([#479](https://github.com/peak/s5cmd/issues/479))
- Fixed a bug where `cp` command could not upload a non-regular file to remote destination. ([#618](https://github.com/peak/s5cmd/pull/618))
- Fixed a crash where a file or a remote object is removed or renamed after it is listed to be operated on. ([#620](https://github.com/peak/s5cmd/pull/620))

## v2.1.0 - 19 Jun 2023

#### Breaking changes
- Adjacent slashes in key are no longer removed when uploading to remote. Before `s5cmd cp file.txt s3://bucket/a//b///c/` would copy to `s3://bucket/a/b/c/file.txt` but now to `s3://bucket/a//b///c/file.txt`.([#459](https://github.com/peak/s5cmd/pull/459))
Expand All @@ -10,13 +46,21 @@
- Added `--content-type` and `--content-encoding` flags to `cp` command. ([#264](https://github.com/peak/s5cmd/issues/264))
- Added `--profile` flag to allow users to specify a [named profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html). ([#353](https://github.com/peak/s5cmd/issues/353))
- Added `--credentials-file` flag to allow users to specify path for the AWS credentials file instead of using the [default location](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where).
- Added `--all-versions` flag to `ls`, `rm`, `du` and `select` subcommands to apply operation on(/over) all versions of the objects. ([#475](https://github.com/peak/s5cmd/pull/475))
- Added `--version-id` flag to `cat`, `cp`/`mv`, `rm`, `du` and `select` subcommands to apply operation on(/over) a specific versions of the object. ([#475](https://github.com/peak/s5cmd/pull/475))
- Added `bucket-version` command to configure bucket versioning. Bucket name alone returns the bucket versioning status of the bucket. Bucket versioning can be configured with `set` flag. ([#475](https://github.com/peak/s5cmd/pull/475))
- Added `--raw` flag to `cat` and `select` subcommands. It disables the wildcard operations. ([#475](https://github.com/peak/s5cmd/pull/475))
- Added `bench.py` script under new `benchmark` folder to compare performances of two different builds of s5cmd. ([#471](https://github.com/peak/s5cmd/pull/471))

#### Improvements
- Disable AWS SDK logger if log level is not `trace`. ([##460](https://github.com/peak/s5cmd/pull/460))
- Disable AWS SDK logger if log level is not `trace`. ([#460](https://github.com/peak/s5cmd/pull/460))
- Allow adjacent slashes to be used as keys when uploading to remote. ([#459](https://github.com/peak/s5cmd/pull/459))
- Debian packages are provided on [releases page](https://github.com/peak/s5cmd/releases) ([#380](https://github.com/peak/s5cmd/issues/380))
- Upgraded minimum required Go version to 1.17.
- The sync command uses `external sort` instead of `internal` sort. This change
reduces RAM usage from ~10 GB to ~1.5 GB for `sync` operation of a directory containing
1,000,000 files at a cost of speed (20% slower for 1,000,000 objects). For smaller
directories (~50,000 files) there is no significant change in speed. ([#483](https://github.com/peak/s5cmd/pull/483))
- Improve auto-completion support of s5cmd for `zsh` and `bash`, start supporting `pwsh` and stop the support for `fish`. Now s5cmd can complete bucket names, s3 keys in a bucket and the local files. However, `install-completion` flag no longer _installs_ the completion script to `*rc` files instead it merely gives instructions to install autocompletion and provides the autocompletion script ([#500](https://github.com/peak/s5cmd/pull/500)).

#### Bugfixes
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.19-alpine as build
FROM golang:1.20-alpine as build
COPY . /s5cmd/
RUN apk add --no-cache git make && \
cd /s5cmd/ && \
CGO_ENABLED=0 make build

FROM alpine:3.15
FROM alpine:3.18
COPY --from=build /s5cmd/s5cmd .
WORKDIR /aws
ENTRYPOINT ["/s5cmd"]
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ all: clean build test check

VERSION := `git describe --abbrev=0 --tags || echo "0.0.0"`
BUILD := `git rev-parse --short HEAD`
LDFLAGS=-ldflags "-X=github.com/peak/s5cmd/version.Version=$(VERSION) -X=github.com/peak/s5cmd/version.GitCommit=$(BUILD)"
LDFLAGS=-ldflags "-X=github.com/peak/s5cmd/v2/version.Version=$(VERSION) -X=github.com/peak/s5cmd/v2/version.GitCommit=$(BUILD)"

.PHONY: build
build:
Expand All @@ -28,11 +28,11 @@ test_without_race:
@S5CMD_BUILD_BINARY_WITHOUT_RACE_FLAG=1 go test -mod=vendor -count=1 ./...

.PHONY: check
check: vet staticcheck unparam check-fmt
check: vet staticcheck unparam check-fmt check-codegen

.PHONY: staticcheck
staticcheck:
@staticcheck -checks 'all,-U1000,-ST1000,-ST1003' ./...
@staticcheck -checks 'all,-ST1000' ./...

.PHONY: unparam
unparam:
Expand All @@ -49,9 +49,13 @@ check-fmt:
exit 1;\
fi

.PHONY: mock
mock:
@mockery -inpkg -dir=storage -name=Storage -case=underscore
.PHONY: check-codegen
check-codegen: gogenerate ## Check generated code is up-to-date
@git diff --exit-code --

.PHONY: gogenerate
gogenerate:
@go generate -mod vendor ./...

.PHONY: clean
clean:
Expand Down
Loading
Loading