mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-11 02:28:22 +00:00
rename executable, add goreleaser
This commit is contained in:
parent
ecbb7c88cd
commit
78d3c80b28
7 changed files with 88 additions and 6 deletions
4
.github/workflows/.docs.yml
vendored
4
.github/workflows/.docs.yml
vendored
|
@ -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
|
||||
|
|
33
.github/workflows/.release.yml
vendored
Normal file
33
.github/workflows/.release.yml
vendored
Normal file
|
@ -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 }}
|
49
.goreleaser.yml
Normal file
49
.goreleaser.yml
Normal file
|
@ -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 <sam@lorch.net>
|
||||
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
|
|
@ -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 |
|
||||
| --- | --- |
|
||||
|
|
|
@ -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() == "" {
|
||||
|
|
|
@ -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.`,
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue