Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensured the print buffer is flushed before program exit, short printing #133

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

dpp
Copy link
Collaborator

@dpp dpp commented Feb 28, 2024

Description

Added an option to only print the gitoid in "plain" output mode so that it can be passed directly to curl or otherwise be used in CLI applications.

Also, ensured the print buffer (an async thread) has completed outputting before the program is terminated. This addressed a bug when using curl https://goatrodeo.org/omnibor/$(omnibor id ...)

Related Issue

Okay... I'm being bad. I didn't create an issue.

Motivation and Context

Make the tool CLI friendly

How Has This Been Tested?

Smoke test

@alilleybrinker
Copy link
Member

Thanks! Maybe instead of a new flag for short output, we could have an additional format option. So there’s:

  • json: use JSON format
  • plain: plaintext, path and artifact ID
  • short: just artifact ID

@dpp
Copy link
Collaborator Author

dpp commented Feb 28, 2024

Should I update the PR?

@alilleybrinker
Copy link
Member

Yeah I think so. Should be pretty easy to change to modify the format enum instead.

@alilleybrinker
Copy link
Member

LGTM! I think you’re just hitting the conventional commit checker on CI. Rebasing to edit the commit messages to be prefixed with a conventional commit standard prefix should work. I’d probably use “feat:”

Added a new 'Short' format that only prints the gitoid

Signed-off-by: David Pollak <feeder.of.the.bears@gmail.com>
@dpp
Copy link
Collaborator Author

dpp commented Feb 29, 2024

@alilleybrinker Ready to merge. Please do the honors.

@alilleybrinker alilleybrinker merged commit d35334c into main Feb 29, 2024
8 checks passed
@alilleybrinker alilleybrinker deleted the dpp_short_and_syncy branch February 29, 2024 16:07
@alilleybrinker
Copy link
Member

Thanks @dpp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants