diff --git a/.github/workflows/.docs.yml b/.github/workflows/.docs.yml index 363a976..77e505b 100644 --- a/.github/workflows/.docs.yml +++ b/.github/workflows/.docs.yml @@ -17,13 +17,13 @@ jobs: go-version: 1.17 - name: Build - run: go build + run: go build -o passbolt - name: Update Wiki run: | mkdir doc ls - ./go-passbolt-cli gendoc + ./passbolt gendoc - name: Upload Documentation to Wiki uses: SwiftDocOrg/github-wiki-publish-action@v1 diff --git a/.github/workflows/.release.yml b/.github/workflows/.release.yml new file mode 100644 index 0000000..bc3386f --- /dev/null +++ b/.github/workflows/.release.yml @@ -0,0 +1,33 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..ebaa358 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,49 @@ +project_name: go-passbolt-cli +builds: + - env: [CGO_ENABLED=0] + goos: + - linux + - windows + - darwin + goarch: + - amd64 + - arm64 + binary: passbolt + hooks: + post: | + ./passbolt completion bash > bash-completion + ./passbolt completion zsh > zsh-completion + ./passbolt completion fish > fish-completion + mkdir man + ./passbolt gendoc --type man +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +release: + draft: true + header: | + ## Release {{ .Tag }} - ({{ .Date }}) +nfpms: +- maintainer: Samuel Lorch + description: A CLI for Passbolt. + homepage: https://github.com/speatzle/go-passbolt-cli + license: MIT + contents: + - src: bash-completion + dst: /usr/share/bash-completion/completions/passbolt + - src: zsh-completion + dst: /usr/share/zsh/site-functions/_passbolt + - src: fish-completion + dst: /usr/share/fish/vendor_completions.d/passbolt.fish + - src: man/* + dst: /usr/share/man/man1/ + recommends: + - bash_completion + formats: + - deb + - rpm + - apk \ No newline at end of file diff --git a/README.md b/README.md index b5cb2c9..a34cf4e 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can then list all users: ```bash go-passbolt-cli list user ``` -For Sharing well need to know how we want to share, for that there are these Permission Types: +For sharing we will need to know how we want to share, for that there are these Permission Types: | Code | Meaning | | --- | --- | diff --git a/cmd/configure.go b/cmd/configure.go index 86b4de3..f70377e 100644 --- a/cmd/configure.go +++ b/cmd/configure.go @@ -12,7 +12,7 @@ var configureCmd = &cobra.Command{ Use: "configure", Short: "Configure saves the provided global flags to the Config File", Long: `Configure saves the provided global flags to the Config File. -this makes using the cli easier as they don't have to be specifed all the time.`, +this makes using the cli easier as they don't have to be specified all the time.`, RunE: func(cmd *cobra.Command, args []string) error { if viper.ConfigFileUsed() == "" { diff --git a/cmd/root.go b/cmd/root.go index 14898d2..45f6275 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -15,7 +15,7 @@ var cfgFile string // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "go-passbolt-cli", + Use: "passbolt", Short: "A CLI tool to interact with Passbolt.", Long: `A CLI tool to interact with Passbolt.`, } diff --git a/resource/list.go b/resource/list.go index 68e88e1..33f6e22 100644 --- a/resource/list.go +++ b/resource/list.go @@ -23,7 +23,7 @@ var ResourceListCmd = &cobra.Command{ } func init() { - ResourceListCmd.Flags().Bool("favorite", false, "Resources that are maked as favorite") + ResourceListCmd.Flags().Bool("favorite", false, "Resources that are marked as favorite") ResourceListCmd.Flags().Bool("own", false, "Resources that are owned by me") ResourceListCmd.Flags().StringArrayP("group", "g", []string{}, "Resources that are shared with group")