Skip to content

Commit

Permalink
fix man page generation
Browse files Browse the repository at this point in the history
other minor changes
  • Loading branch information
drakkan committed Oct 17, 2020
1 parent f884447 commit 756c3d0
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.2.1
uses: golangci/golangci-lint-action@v2
with:
version: latest
14 changes: 13 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
DOCKER_IMAGE=drakkan/sftpgo
VERSION=noop
DOCKERFILE=Dockerfile
MINOR=""
MAJOR=""
if [ "${{ github.event_name }}" = "schedule" ]; then
VERSION=nightly
elif [[ $GITHUB_REF == refs/tags/* ]]; then
Expand All @@ -49,15 +51,25 @@ jobs:
elif [[ $GITHUB_REF == refs/pull/* ]]; then
VERSION=pr-${{ github.event.number }}
fi
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
MINOR=${VERSION%.*}
MAJOR=${MINOR%.*}
fi
if [[ $DOCKER_PKG == alpine ]]; then
VERSION="$VERSION-alpine"
VERSION="${VERSION}-alpine"
DOCKERFILE=Dockerfile.alpine
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
if [[ $GITHUB_REF == refs/tags/* ]]; then
if [[ $DOCKER_PKG == debian ]]; then
if [[ -n $MAJOR && -n $MINOR ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR},${DOCKER_IMAGE}:${MAJOR}"
fi
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
else
if [[ -n $MAJOR && -n $MINOR ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:${MINOR}-alpine,${DOCKER_IMAGE}:${MAJOR}-alpine"
fi
TAGS="$TAGS,${DOCKER_IMAGE}:alpine"
fi
fi
Expand Down
21 changes: 15 additions & 6 deletions cmd/gencompletion.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,40 @@ import (

var genCompletionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate shell completion script to the stdout",
Short: "Generate shell completion script",
Long: `To load completions:
Bash:
$ source <(sftpgo gen completion bash)
# To load completions for each session, execute once:
To load completions for each session, execute once:
Linux:
$ sftpgo gen completion bash > /etc/bash_completion.d/sftpgo-completion.bash
$ sudo sftpgo gen completion bash > /usr/share/bash-completion/completions/sftpgo
MacOS:
$ sftpgo gen completion bash > /usr/local/etc/bash_completion.d/sftpgo-completion.bash
$ sudo sftpgo gen completion bash > /usr/local/etc/bash_completion.d/sftpgo
Zsh:
$ source <(sftpgo gen completion zsh)
If shell completion is not already enabled in your environment you will need
to enable it. You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions for each session, execute once:
# To load completions for each session, execute once:
$ sftpgo gen completion zsh > "${fpath[1]}/_sftpgo"
Fish:
$ sftpgo gen completion fish | source
# To load completions for each session, execute once:
$ sftpgo gen completion fish > ~/.config/fish/completions/sftpgo.fish
`,
DisableFlagsInUseLine: true,
Expand Down
32 changes: 15 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/drakkan/sftpgo
go 1.14

require (
cloud.google.com/go v0.68.0 // indirect
cloud.google.com/go v0.69.1 // indirect
cloud.google.com/go/storage v1.12.0
github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962
github.com/alexedwards/argon2id v0.0.0-20200802152012-2464efd3196b
github.com/aws/aws-sdk-go v1.35.7
github.com/aws/aws-sdk-go v1.35.9
github.com/eikenb/pipeat v0.0.0-20200430215831-470df5986b6d
github.com/fclairamb/ftpserverlib v0.8.1-0.20201007044523-7c6c9f869560
github.com/fsnotify/fsnotify v1.4.9 // indirect
Expand All @@ -20,42 +20,40 @@ require (
github.com/lib/pq v1.8.0
github.com/magiconair/properties v1.8.4 // indirect
github.com/mattn/go-sqlite3 v1.14.4
github.com/miekg/dns v1.1.31 // indirect
github.com/miekg/dns v1.1.33 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/otiai10/copy v1.2.0
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pires/go-proxyproto v0.2.0
github.com/pkg/sftp v1.12.1-0.20201002132022-fcaa492add82
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/common v0.14.0 // indirect
github.com/prometheus/procfs v0.2.0 // indirect
github.com/prometheus/client_golang v1.8.0
github.com/rs/cors v1.7.1-0.20200626170627-8b4a00bd362b
github.com/rs/xid v1.2.1
github.com/rs/zerolog v1.20.0
github.com/spf13/afero v1.4.1
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0
github.com/spf13/cobra v1.1.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.6.1
github.com/studio-b12/gowebdav v0.0.0-20200303150724-9380631c29a1
go.etcd.io/bbolt v1.3.5
go.opencensus.io v0.22.5 // indirect
go.uber.org/automaxprocs v1.3.0
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
golang.org/x/net v0.0.0-20201009032441-dbdefad45b89
golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634
golang.org/x/tools v0.0.0-20201009162240-fcf82128ed91 // indirect
google.golang.org/api v0.32.0
google.golang.org/genproto v0.0.0-20201009135657-4d944d34d83c // indirect
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0
golang.org/x/sys v0.0.0-20201017003518-b09fb700fbb7
golang.org/x/tools v0.0.0-20201017001424-6003fad69a88 // indirect
google.golang.org/api v0.33.0
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20201015140912-32ed001d685c // indirect
google.golang.org/grpc v1.33.0 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0
)

replace (
github.com/jlaffaye/ftp => github.com/drakkan/ftp v0.0.0-20200730125632-b21eac28818c
golang.org/x/crypto => github.com/drakkan/crypto v0.0.0-20201004100511-699278c1b1a6
golang.org/x/net => github.com/drakkan/net v0.0.0-20201009181612-ea761ff178f6
github.com/spf13/cobra => github.com/drakkan/cobra v0.0.0-20201017151931-7f8581c4f009
golang.org/x/crypto => github.com/drakkan/crypto v0.0.0-20201017144935-4e8324213ac3
golang.org/x/net => github.com/drakkan/net v0.0.0-20201017144739-aa7ab65e4c0d
)
Loading

0 comments on commit 756c3d0

Please sign in to comment.