Skip to content

Commit

Permalink
Use urfave/cli package (peak#94)
Browse files Browse the repository at this point in the history
Fixes peak#98
Fixes peak#97
Fixes peak#23

Breaking changes:
 - 's5cmd get' command is removed. We have 2 identical commands without a clear reasoning. s5cmd cp <src> . has the same result as s5cmd get <src>.
 - batch-rm command is removed. Users can run 's5cmd rm' with variadic arguments. Wildcards are accepted.
 - 's5cmd -f' became 's5cmd run'
 - All errors are written to stderr
 - 's5cmd ls s3://non-existent/object' returns 1 instead of 0. Related: peak#23
 - Exit code for errors changed from 127 to 1
 - 's5cmd cp s3://bucket/object local/directory/' now creates the missing local/directory/ instead of returning an error.

Co-authored-by: Onur Sonmez <[email protected]>
  • Loading branch information
igungor and sonmezonur committed Mar 19, 2020
1 parent b533495 commit 9fa34b2
Show file tree
Hide file tree
Showing 164 changed files with 14,382 additions and 5,355 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go:

before_install:
- go get honnef.co/go/tools/cmd/staticcheck
- go get mvdan.cc/unparam

before_script:
# e2e tests expects 0755 as default folder modbits, however on travis VMs,
Expand Down
20 changes: 7 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ default: all

.PHONY: all
all: clean build test check
.PHONY: dist
dist: generate all

.PHONY: fmt
fmt:
@find ${SRCDIR} ! -path "*/vendor/*" -type f -name '*.go' -exec gofmt -l -s -w {} \;

.PHONY: generate
generate:
@go generate ${SRCDIR}

.PHONY: build
build:
Expand All @@ -24,19 +14,23 @@ test:
@go test -mod=vendor ./...

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

.PHONY: staticcheck
staticcheck:
@staticcheck -checks 'inherit,-SA4009,-U1000' ./...
@staticcheck -checks 'inherit,-U1000' ./...

.PHONY: unparam
unparam:
@unparam ./...

.PHONY: vet
vet:
@go vet -mod=vendor ./...

.PHONY: check-fmt
check-fmt:
@sh -c 'unfmt_files="$$(go fmt ./...)"; if [ -n "$$unfmt_files" ]; then echo "$$unfmt_files"; echo "Go code is not formatted, run <make fmt>"; exit 1; fi'
@sh -c 'if [ -n "$(go fmt -mod=vendor ./...)" ]; then echo "Go code is not formatted"; exit 1; fi'

.PHONY: clean
clean:
Expand Down
Loading

0 comments on commit 9fa34b2

Please sign in to comment.