bridgecrewio / yor

Extensible auto-tagger for your IaC files. The ultimate way to link entities in the cloud back to the codified resource which created it.
https://www.yor.io
Apache License 2.0
808 stars 123 forks source link

--version flag missing since 0.1.180 #407

Closed samgiles closed 1 year ago

samgiles commented 1 year ago

Describe the bug -v flag missing since 0.1.180.

To Reproduce

0.1.181:

»»»» ./yor -v                                                                                                                             137|18:13:09
Incorrect Usage. flag provided but not defined: -v

NAME:
   yor - enrich IaC files with tags automatically

USAGE:
   yor [global options] command [command options] [arguments...]

DESCRIPTION:
   Yor, the IaC auto-tagger

AUTHOR:
   Bridgecrew <support@bridgecrew.io>

COMMANDS:
   list-tags        List the tags yor will create if possible
   list-tag-groups  List the tag groups that will be applied by yor
   tag              apply tagging across your directory
   help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)
2023/07/12 18:13:13 [ERROR] flag provided but not defined: -v

0.1.180

»»»» ./yor --help                                                                                                                           0|18:11:24
NAME:
   yor - enrich IaC files with tags automatically

USAGE:
   yor [global options] command [command options] [arguments...]

VERSION:
   0.1.180

DESCRIPTION:
   Yor, the IaC auto-tagger

AUTHOR:
   Bridgecrew <support@bridgecrew.io>

COMMANDS:
   list-tags        List the tags yor will create if possible
   list-tag-groups  List the tag groups that will be applied by yor
   tag              apply tagging across your directory
   help, h          Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help (default: false)
   --version, -v  print the version (default: false)

Expected behavior

The version information should appear and the -v flag should work.

Additional context

https://github.com/bridgecrewio/yor-action/issues/241

JamesWoolfenden commented 1 year ago

i imagine the value of GORELEASER_CURRENT_TAG is empty

melissarh57 commented 1 year ago

seconded!

mikecarr2 commented 1 year ago

This is causing the Yor GitHub action to fail as it calls Yor with -v to start up 😞 https://github.com/bridgecrewio/yor-action/blob/fabb4367644494f3c224846fa02459599ea05e31/src/main.ts#L50

melissarh57 commented 1 year ago

was this fix included in the release just now?

JamesWoolfenden commented 1 year ago

yes. and its fixed.