@@ -121,6 +121,17 @@ import (
121
121
"github.com/urfave/cli"
122
122
)
123
123
124
+ const (
125
+ filesCategory = "Files Management"
126
+ buildCategory = "Build Info"
127
+ repoCategory = "Repository Management"
128
+ replicCategory = "Replication"
129
+ permCategory = "Permission Targets"
130
+ userCategory = "User Management"
131
+ transferCategory = "Transfer Between Artifactory Instances"
132
+ otherCategory = "Other"
133
+ )
134
+
124
135
func GetCommands () []cli.Command {
125
136
return cliutils .GetSortedCommands (cli.CommandsByName {
126
137
{
@@ -133,6 +144,7 @@ func GetCommands() []cli.Command {
133
144
ArgsUsage : common .CreateEnvVars (upload .EnvVar ... ),
134
145
BashComplete : corecommon .CreateBashCompletionFunc (),
135
146
Action : uploadCmd ,
147
+ Category : filesCategory ,
136
148
},
137
149
{
138
150
Name : "download" ,
@@ -144,6 +156,7 @@ func GetCommands() []cli.Command {
144
156
ArgsUsage : common .CreateEnvVars (download .EnvVar ... ),
145
157
BashComplete : corecommon .CreateBashCompletionFunc (),
146
158
Action : downloadCmd ,
159
+ Category : filesCategory ,
147
160
},
148
161
{
149
162
Name : "move" ,
@@ -155,6 +168,7 @@ func GetCommands() []cli.Command {
155
168
ArgsUsage : common .CreateEnvVars (move .EnvVar ),
156
169
BashComplete : corecommon .CreateBashCompletionFunc (),
157
170
Action : moveCmd ,
171
+ Category : filesCategory ,
158
172
},
159
173
{
160
174
Name : "copy" ,
@@ -166,6 +180,7 @@ func GetCommands() []cli.Command {
166
180
ArgsUsage : common .CreateEnvVars (copydocs .EnvVar ),
167
181
BashComplete : corecommon .CreateBashCompletionFunc (),
168
182
Action : copyCmd ,
183
+ Category : filesCategory ,
169
184
},
170
185
{
171
186
Name : "delete" ,
@@ -177,6 +192,7 @@ func GetCommands() []cli.Command {
177
192
ArgsUsage : common .CreateEnvVars (delete .EnvVar ),
178
193
BashComplete : corecommon .CreateBashCompletionFunc (),
179
194
Action : deleteCmd ,
195
+ Category : filesCategory ,
180
196
},
181
197
{
182
198
Name : "search" ,
@@ -188,6 +204,7 @@ func GetCommands() []cli.Command {
188
204
ArgsUsage : common .CreateEnvVars (search .EnvVar ),
189
205
BashComplete : corecommon .CreateBashCompletionFunc (),
190
206
Action : searchCmd ,
207
+ Category : filesCategory ,
191
208
},
192
209
{
193
210
Name : "set-props" ,
@@ -199,6 +216,7 @@ func GetCommands() []cli.Command {
199
216
ArgsUsage : common .CreateEnvVars (setprops .EnvVar ),
200
217
BashComplete : corecommon .CreateBashCompletionFunc (),
201
218
Action : setPropsCmd ,
219
+ Category : filesCategory ,
202
220
},
203
221
{
204
222
Name : "delete-props" ,
@@ -210,6 +228,7 @@ func GetCommands() []cli.Command {
210
228
ArgsUsage : common .CreateEnvVars (deleteprops .EnvVar ),
211
229
BashComplete : corecommon .CreateBashCompletionFunc (),
212
230
Action : deletePropsCmd ,
231
+ Category : filesCategory ,
213
232
},
214
233
{
215
234
Name : "build-publish" ,
@@ -221,6 +240,7 @@ func GetCommands() []cli.Command {
221
240
ArgsUsage : common .CreateEnvVars (),
222
241
BashComplete : corecommon .CreateBashCompletionFunc (),
223
242
Action : buildPublishCmd ,
243
+ Category : buildCategory ,
224
244
},
225
245
{
226
246
Name : "build-collect-env" ,
@@ -232,6 +252,7 @@ func GetCommands() []cli.Command {
232
252
ArgsUsage : common .CreateEnvVars (),
233
253
BashComplete : corecommon .CreateBashCompletionFunc (),
234
254
Action : buildCollectEnvCmd ,
255
+ Category : buildCategory ,
235
256
},
236
257
{
237
258
Name : "build-append" ,
@@ -243,6 +264,7 @@ func GetCommands() []cli.Command {
243
264
ArgsUsage : common .CreateEnvVars (),
244
265
BashComplete : corecommon .CreateBashCompletionFunc (),
245
266
Action : buildAppendCmd ,
267
+ Category : buildCategory ,
246
268
},
247
269
{
248
270
Name : "build-add-dependencies" ,
@@ -254,6 +276,7 @@ func GetCommands() []cli.Command {
254
276
ArgsUsage : common .CreateEnvVars (),
255
277
BashComplete : corecommon .CreateBashCompletionFunc (),
256
278
Action : buildAddDependenciesCmd ,
279
+ Category : buildCategory ,
257
280
},
258
281
{
259
282
Name : "build-add-git" ,
@@ -265,6 +288,7 @@ func GetCommands() []cli.Command {
265
288
ArgsUsage : common .CreateEnvVars (),
266
289
BashComplete : corecommon .CreateBashCompletionFunc (),
267
290
Action : buildAddGitCmd ,
291
+ Category : buildCategory ,
268
292
},
269
293
{
270
294
Name : "build-scan" ,
@@ -289,6 +313,7 @@ func GetCommands() []cli.Command {
289
313
ArgsUsage : common .CreateEnvVars (),
290
314
BashComplete : corecommon .CreateBashCompletionFunc (),
291
315
Action : buildCleanCmd ,
316
+ Category : buildCategory ,
292
317
},
293
318
{
294
319
Name : "build-promote" ,
@@ -300,6 +325,7 @@ func GetCommands() []cli.Command {
300
325
ArgsUsage : common .CreateEnvVars (),
301
326
BashComplete : corecommon .CreateBashCompletionFunc (),
302
327
Action : buildPromoteCmd ,
328
+ Category : buildCategory ,
303
329
},
304
330
{
305
331
Name : "build-discard" ,
@@ -311,6 +337,7 @@ func GetCommands() []cli.Command {
311
337
ArgsUsage : common .CreateEnvVars (),
312
338
BashComplete : corecommon .CreateBashCompletionFunc (),
313
339
Action : buildDiscardCmd ,
340
+ Category : buildCategory ,
314
341
},
315
342
{
316
343
Name : "git-lfs-clean" ,
@@ -322,6 +349,7 @@ func GetCommands() []cli.Command {
322
349
ArgsUsage : common .CreateEnvVars (),
323
350
BashComplete : corecommon .CreateBashCompletionFunc (),
324
351
Action : gitLfsCleanCmd ,
352
+ Category : otherCategory ,
325
353
},
326
354
{
327
355
Name : "mvn-config" ,
@@ -387,6 +415,7 @@ func GetCommands() []cli.Command {
387
415
ArgsUsage : common .CreateEnvVars (),
388
416
BashComplete : corecommon .CreateBashCompletionFunc (),
389
417
Action : dockerPromoteCmd ,
418
+ Category : buildCategory ,
390
419
},
391
420
{
392
421
Name : "docker-push" ,
@@ -428,6 +457,7 @@ func GetCommands() []cli.Command {
428
457
Action : func (c * cli.Context ) error {
429
458
return containerPushCmd (c , containerutils .Podman )
430
459
},
460
+ Category : otherCategory ,
431
461
},
432
462
{
433
463
Name : "podman-pull" ,
@@ -441,6 +471,7 @@ func GetCommands() []cli.Command {
441
471
Action : func (c * cli.Context ) error {
442
472
return containerPullCmd (c , containerutils .Podman )
443
473
},
474
+ Category : otherCategory ,
444
475
},
445
476
{
446
477
Name : "build-docker-create" ,
@@ -452,6 +483,7 @@ func GetCommands() []cli.Command {
452
483
ArgsUsage : common .CreateEnvVars (),
453
484
BashComplete : corecommon .CreateBashCompletionFunc (),
454
485
Action : BuildDockerCreateCmd ,
486
+ Category : buildCategory ,
455
487
},
456
488
{
457
489
Name : "oc" , // Only 'oc start-build' is supported
@@ -463,6 +495,7 @@ func GetCommands() []cli.Command {
463
495
SkipFlagParsing : true ,
464
496
BashComplete : corecommon .CreateBashCompletionFunc (),
465
497
Action : ocStartBuildCmd ,
498
+ Category : otherCategory ,
466
499
},
467
500
{
468
501
Name : "npm-config" ,
@@ -582,6 +615,7 @@ func GetCommands() []cli.Command {
582
615
ArgsUsage : common .CreateEnvVars (),
583
616
BashComplete : corecommon .CreateBashCompletionFunc (),
584
617
Action : nugetDepsTreeCmd ,
618
+ Category : otherCategory ,
585
619
},
586
620
{
587
621
Name : "dotnet-config" ,
@@ -709,6 +743,7 @@ func GetCommands() []cli.Command {
709
743
ArgsUsage : common .CreateEnvVars (),
710
744
BashComplete : corecommon .CreateBashCompletionFunc (),
711
745
Action : repoTemplateCmd ,
746
+ Category : repoCategory ,
712
747
},
713
748
{
714
749
Name : "repo-create" ,
@@ -720,6 +755,7 @@ func GetCommands() []cli.Command {
720
755
ArgsUsage : common .CreateEnvVars (),
721
756
BashComplete : corecommon .CreateBashCompletionFunc (),
722
757
Action : repoCreateCmd ,
758
+ Category : repoCategory ,
723
759
},
724
760
{
725
761
Name : "repo-update" ,
@@ -731,6 +767,7 @@ func GetCommands() []cli.Command {
731
767
ArgsUsage : common .CreateEnvVars (),
732
768
BashComplete : corecommon .CreateBashCompletionFunc (),
733
769
Action : repoUpdateCmd ,
770
+ Category : repoCategory ,
734
771
},
735
772
{
736
773
Name : "repo-delete" ,
@@ -742,6 +779,7 @@ func GetCommands() []cli.Command {
742
779
ArgsUsage : common .CreateEnvVars (),
743
780
BashComplete : corecommon .CreateBashCompletionFunc (),
744
781
Action : repoDeleteCmd ,
782
+ Category : repoCategory ,
745
783
},
746
784
{
747
785
Name : "replication-template" ,
@@ -753,6 +791,7 @@ func GetCommands() []cli.Command {
753
791
ArgsUsage : common .CreateEnvVars (),
754
792
BashComplete : corecommon .CreateBashCompletionFunc (),
755
793
Action : replicationTemplateCmd ,
794
+ Category : replicCategory ,
756
795
},
757
796
{
758
797
Name : "replication-create" ,
@@ -764,6 +803,7 @@ func GetCommands() []cli.Command {
764
803
ArgsUsage : common .CreateEnvVars (),
765
804
BashComplete : corecommon .CreateBashCompletionFunc (),
766
805
Action : replicationCreateCmd ,
806
+ Category : replicCategory ,
767
807
},
768
808
{
769
809
Name : "replication-delete" ,
@@ -775,6 +815,7 @@ func GetCommands() []cli.Command {
775
815
ArgsUsage : common .CreateEnvVars (),
776
816
BashComplete : corecommon .CreateBashCompletionFunc (),
777
817
Action : replicationDeleteCmd ,
818
+ Category : replicCategory ,
778
819
},
779
820
{
780
821
Name : "permission-target-template" ,
@@ -785,6 +826,7 @@ func GetCommands() []cli.Command {
785
826
ArgsUsage : common .CreateEnvVars (),
786
827
BashComplete : corecommon .CreateBashCompletionFunc (),
787
828
Action : permissionTargetTemplateCmd ,
829
+ Category : permCategory ,
788
830
},
789
831
{
790
832
Name : "permission-target-create" ,
@@ -796,6 +838,7 @@ func GetCommands() []cli.Command {
796
838
ArgsUsage : common .CreateEnvVars (),
797
839
BashComplete : corecommon .CreateBashCompletionFunc (),
798
840
Action : permissionTargetCreateCmd ,
841
+ Category : permCategory ,
799
842
},
800
843
{
801
844
Name : "permission-target-update" ,
@@ -807,6 +850,7 @@ func GetCommands() []cli.Command {
807
850
ArgsUsage : common .CreateEnvVars (),
808
851
BashComplete : corecommon .CreateBashCompletionFunc (),
809
852
Action : permissionTargetUpdateCmd ,
853
+ Category : permCategory ,
810
854
},
811
855
{
812
856
Name : "permission-target-delete" ,
@@ -818,6 +862,7 @@ func GetCommands() []cli.Command {
818
862
ArgsUsage : common .CreateEnvVars (),
819
863
BashComplete : corecommon .CreateBashCompletionFunc (),
820
864
Action : permissionTargetDeleteCmd ,
865
+ Category : permCategory ,
821
866
},
822
867
{
823
868
Name : "user-create" ,
@@ -827,6 +872,7 @@ func GetCommands() []cli.Command {
827
872
ArgsUsage : common .CreateEnvVars (),
828
873
BashComplete : corecommon .CreateBashCompletionFunc (),
829
874
Action : userCreateCmd ,
875
+ Category : userCategory ,
830
876
},
831
877
{
832
878
Name : "users-create" ,
@@ -837,6 +883,7 @@ func GetCommands() []cli.Command {
837
883
ArgsUsage : common .CreateEnvVars (),
838
884
BashComplete : corecommon .CreateBashCompletionFunc (),
839
885
Action : usersCreateCmd ,
886
+ Category : userCategory ,
840
887
},
841
888
{
842
889
Name : "users-delete" ,
@@ -848,6 +895,7 @@ func GetCommands() []cli.Command {
848
895
ArgsUsage : common .CreateEnvVars (),
849
896
BashComplete : corecommon .CreateBashCompletionFunc (),
850
897
Action : usersDeleteCmd ,
898
+ Category : userCategory ,
851
899
},
852
900
{
853
901
Name : "group-create" ,
@@ -859,6 +907,7 @@ func GetCommands() []cli.Command {
859
907
ArgsUsage : common .CreateEnvVars (),
860
908
BashComplete : corecommon .CreateBashCompletionFunc (),
861
909
Action : groupCreateCmd ,
910
+ Category : userCategory ,
862
911
},
863
912
{
864
913
Name : "group-add-users" ,
@@ -870,6 +919,7 @@ func GetCommands() []cli.Command {
870
919
ArgsUsage : common .CreateEnvVars (),
871
920
BashComplete : corecommon .CreateBashCompletionFunc (),
872
921
Action : groupAddUsersCmd ,
922
+ Category : userCategory ,
873
923
},
874
924
{
875
925
Name : "group-delete" ,
@@ -881,6 +931,7 @@ func GetCommands() []cli.Command {
881
931
ArgsUsage : common .CreateEnvVars (),
882
932
BashComplete : corecommon .CreateBashCompletionFunc (),
883
933
Action : groupDeleteCmd ,
934
+ Category : userCategory ,
884
935
},
885
936
{
886
937
Name : "access-token-create" ,
@@ -903,6 +954,7 @@ func GetCommands() []cli.Command {
903
954
ArgsUsage : common .CreateEnvVars (),
904
955
BashComplete : corecommon .CreateBashCompletionFunc (),
905
956
Action : transferSettingsCmd ,
957
+ Category : transferCategory ,
906
958
},
907
959
{
908
960
Name : "transfer-config" ,
@@ -913,6 +965,7 @@ func GetCommands() []cli.Command {
913
965
ArgsUsage : common .CreateEnvVars (),
914
966
BashComplete : corecommon .CreateBashCompletionFunc (),
915
967
Action : transferConfigCmd ,
968
+ Category : transferCategory ,
916
969
},
917
970
{
918
971
Name : "transfer-config-merge" ,
@@ -923,6 +976,7 @@ func GetCommands() []cli.Command {
923
976
ArgsUsage : common .CreateEnvVars (),
924
977
BashComplete : corecommon .CreateBashCompletionFunc (),
925
978
Action : transferConfigMergeCmd ,
979
+ Category : transferCategory ,
926
980
},
927
981
{
928
982
Name : "transfer-files" ,
@@ -933,6 +987,7 @@ func GetCommands() []cli.Command {
933
987
ArgsUsage : common .CreateEnvVars (),
934
988
BashComplete : corecommon .CreateBashCompletionFunc (),
935
989
Action : transferFilesCmd ,
990
+ Category : transferCategory ,
936
991
},
937
992
{
938
993
Name : "transfer-plugin-install" ,
@@ -943,6 +998,7 @@ func GetCommands() []cli.Command {
943
998
ArgsUsage : common .CreateEnvVars (),
944
999
BashComplete : corecommon .CreateBashCompletionFunc (),
945
1000
Action : dataTransferPluginInstallCmd ,
1001
+ Category : transferCategory ,
946
1002
},
947
1003
})
948
1004
}
0 commit comments