Commit graph

671 commits

Author SHA1 Message Date
Ryan Curtin
5bad1b6366 Merge tag 'v1.4.1' into develop
v1.4.1
2022-04-18 16:57:22 -04:00
Ryan Curtin
4e75f5d08f Returns an early error if decryption fails 2022-04-18 16:49:51 -04:00
Ryan Curtin
0f1cf0cbbd Merge tag 'v1.4.0' into develop
v1.4.0
2021-12-20 14:28:43 -05:00
Ryan Curtin
061ea08f4d Merge branch 'release-1.4.0' 2021-12-20 14:28:36 -05:00
Ryan Curtin
6163b0af96 Merge tag '0.1.0' into develop
0.1.0
2021-12-16 17:14:55 -05:00
Ryan Curtin
18ca9a4b0b
Merge pull request #7 from OneCloudInc/hotfix-0.1.0
Update Cobra CLI to decrypt secrets [STUD-234]
2021-12-16 17:14:40 -05:00
Ryan Curtin
1f5bfa181b Code review fixes - seeding random number generator and handling error with setting header 2021-12-16 17:03:32 -05:00
Ryan Curtin
1223d49a62 Fixes issue references 2021-12-16 14:39:36 -05:00
Ryan Curtin
ef632ed1e1 Converting cobra to use OneCloudInc/cobra in all cases 2021-12-16 14:27:35 -05:00
Ryan Curtin
c21dc0fc86 Fixes CircleCI 2021-12-16 14:13:53 -05:00
Ryan Curtin
2a36c3f409 Explicitly sending JSON request 2021-12-16 14:02:52 -05:00
Ryan Curtin
b430be08ed Ensures that payload is built correctly 2021-12-14 17:03:56 -05:00
Ryan Curtin
f927bb8b1f Adds test for reaper decryptor 2021-12-14 16:58:15 -05:00
Ryan Curtin
93ca442bab Adds the ability to decrypt arguments using the reaper service 2021-12-14 16:47:22 -05:00
Ryan Curtin
ce89c5abe8 Placeholder for performing decryption logic; cobra now distributed using go modules 2021-12-07 17:11:39 -05:00
Brian Meyers
12d6bd86cf Merge tag '0.0.6' into develop
Hotfix 0.0.6
2019-02-22 15:52:26 -05:00
Brian Meyers
01e6d77711
Merge pull request #6 from OneCloudInc/release-0.0.6
Release 0.0.6
2019-02-22 15:52:12 -05:00
Brian Meyers
5cecced576 Use RunE 2019-02-22 15:51:50 -05:00
Brian Meyers
b549b4ca19 Merge tag '0.0.5' into develop
Release 0.0.5
2019-02-22 14:20:44 -05:00
Brian Meyers
e4569a214a
Merge pull request #5 from OneCloudInc/release-0.0.5
Release 0.0.5
2019-02-22 14:20:26 -05:00
Brian Meyers
96868d8f05 Only change the CLI tool to use OneCloudInc 2019-02-22 14:20:00 -05:00
Brian Meyers
8b91f1a653 Merge tag '0.0.4' into develop
Release 0.0.4
2019-02-22 13:43:40 -05:00
Brian Meyers
fe83a627d2
Merge pull request #4 from OneCloudInc/release-0.0.4
Release 0.0.4
2019-02-22 13:43:17 -05:00
Brian Meyers
4b2965f3d6 Fixed tests and added dep 2019-02-22 13:38:36 -05:00
Brian Meyers
65c085b0b3
Merge pull request #1 from OneCloudInc/feature-oc-generator
Feature oc generator
2019-02-22 13:20:29 -05:00
Brian Meyers
b3a45b8407 Allow both persistent and local flags for root vs command. Removed default viper. Allow flags to be set on the rootCmd as well. 2019-02-22 13:19:46 -05:00
Brian Meyers
bcc54ae73f Custom generator that will generate arguments and flags right from the command line 2019-02-22 13:06:52 -05:00
Brian Meyers
9224a9a8f3 Rename packages to use OneCloud 2019-02-22 12:58:38 -05:00
Michael
7547e83b2d Run tests against go 1.11 and drop 1.9 (#737)
* Update the Travis and CircleCI Go versions

* Adapt to new gofmt formatting

The formatting of gofmt changed slightly in go 1.11.  The release
notes recommend to use a specific binary of gofmt.  See
https://golang.org/doc/go1.11#gofmt

This commit adapts to the new formatting applied by gofmt and changes
the configs for travis and circleci to run gofmt only with go 1.11.
2019-01-08 19:34:09 -05:00
Daisuke Taniwaki
d2d81d9a96 Fix too many underscore for __custom_func (#794)
* Fix too many underscore for __custom_func

* Fix typo of too many leading underscores in docs
2018-11-27 08:31:06 -05:00
Aleksa Sarai
fe5e611709 doc: obey SOURCE_DATE_EPOCH with manpage generation (#735)
Previously if a cobra user didn't specify an explicit .Date header, the
current time would be included in all of the generated man pages each
time they were built. This causes an issue for reproducible builds,
since each re-build of a package that includes the man pages will have
different times listed in the man pages.

To fix this, add support for SOURCE_DATE_EPOCH (which is a standardised
packaging environment variable, designed to be used specifically for
this purpose[1]).

[1]: https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2018-10-21 10:11:14 -04:00
bpdunni
f619abc1d7 Added ExactValidArgs (#765) 2018-10-21 10:01:21 -04:00
Garret Kelly
40172f1635 Remove unneeded imports from README.md example (#767) 2018-10-18 10:37:54 -04:00
Alex Mayer
8d114be902 README: Remove Unneeded Newline (#746) 2018-09-15 18:22:04 -04:00
Marian Steinbach
99dc123558 Replace Giant Swarm 'swarm' with 'gsctl' (#738) 2018-08-29 12:07:45 -04:00
Paul
6fd8e29b07 Qualify custom bash func name (#730)
* Qualify custom bash func name

 - fixes issue where multiple cobra apps using custom bash completion
 would have their __custom_func collide
 - support fallback to plain __custom_func to maintain compatibility

#694

* Improve tests for bash completion __custom_func

 - check for the correct number of occurrences of function name

#694
2018-08-21 12:12:02 -04:00
Pascal Dierich
ff0d02e855 fix typo in doc/man_docs.go (#732) 2018-08-20 13:45:24 -04:00
Federico
7c4570c3eb #716 - Removed useless libraries in readme (#717)
Signed-off-by: Federico <federico@imaginecurve.com>
2018-07-22 17:56:44 -04:00
Hyang-Ah Hana Kim
a114f312e0 fix test build breakage with go1.11 (#712)
As discussed in golang/go#26109, vet typecheck is enabled
in go1.11 and the command_test.go can't be compiled any
more with go1.11 due to the unread variables in the
command_test.go.

Instead of removing the unused variables, this CL reads the
variables and compares the values against the current
behavior so when the related issue is fixed, this test can
be updated accordingly.
2018-06-29 11:25:35 -04:00
Jason Hendry
1e58aa3361 Include a basic example #465 (#631) 2018-05-31 14:03:38 -04:00
Zef Hemel
ef82de70bb Fixed code sample for bash completion (#687) 2018-04-27 09:45:50 -04:00
James DeFelice
0ab5b6bcfc doc: hide hidden parent flags (#686)
* fixes #685
2018-04-24 12:15:12 -04:00
Rajat Jindal
7ee208b09f support completions for command aliases (#669)
* support completions for command aliases

* try newer version of shellcheck

* initialize aliashash only when BASH_VERSION > 3
2018-04-23 08:47:20 -04:00
Rajat Jindal
615425954c remove dot after the abs path (#672) 2018-04-12 08:08:29 -04:00
Allen Sun
cd30c2a7e9 typo: fix incorrect (#668)
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
2018-04-08 12:17:36 -04:00
Rajat Jindal
4dab30cb33 Add support for ignoring parse errors (#662) 2018-03-31 08:36:20 -04:00
Michael
a1f051bc3e Update the Travis and CircleCI Go versions (#651) 2018-03-21 09:39:34 -05:00
Di Xu
c439c4fa09 Terminate the stripping of flags when -- is found (#649) 2018-03-19 11:20:04 +05:00
Bilal Amarni
c6c44e6fdc Update the bash completion example for kubectl (#645) 2018-03-01 10:15:57 -08:00
John McCabe
6644d46b81 Prefix bash functions with root command name (#643)
* Prefix bash functions with root command name

Prior to this commit the autocomplete bash functions were being prefixed
with the root command name, but references to those functions from
subcommands were having the subcommands prefixed instead - causing the
function lookups to fail and error out.

For example (as observed in kubernetes/kubernetes#60517):

kubectl create -f [Tab] failed with the following message: kubectl
create -f __create_handle_filename_extension_flag: command not found

in this case the function being invoked should be __kubectl_handle_filename_extension_flag

Signed-off-by: John McCabe <john@johnmccabe.net>

* Test filename extension and subdirs_in_dir for subcommands

This commit adds two regex based tests to ensure that the handle
filename extension and handle subdirs in dir functions are prefixed by
the root command when present in subcommands.

Previously they had been prefixed incorrectly with the subcommand name.

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-02-27 21:38:38 -08:00