-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add quiet option #40
Open
fernandocollova
wants to merge
17
commits into
markchalloner:master
Choose a base branch
from
fernandocollova:add_quiet_option
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add quiet option #40
fernandocollova
wants to merge
17
commits into
markchalloner:master
from
fernandocollova:add_quiet_option
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Seeing the diff, I just realized I branched from the wrong commit, as I thought I made this MR when I didn't :/ I amended the lines differing from master, so this code is what I actually want to submit, but if you see it necessary, I'll close this MR and open a new one branching from the correct place. Thanks, Fernando |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again,
As I was trying to add this script to another step in my release process, I stumbled upon the fact that it wasn't so easy to get only the version that was just tagged, as the script's output is always printed on each run.
So, instead of capturing the output and extracting only the last line, I added a
-q, --quiet
option. It's implemented with minimal changes to the code, borrowing heavily from tldp.org and has some design choices that are worth mentioning:-b
and-p
options, it still outputs the help if no input is provided.I'm specially hesitant about the second point, because although I want to keep the original behavior, I can totally see the situation in which you run something along the lines of
git semver major --release "$(my_awesome_release_generator)"
and after the awesome release generator returns nothing, the scripts outputs "something" instead of failing echoing nothing, which might incorrectly signal the code was actually tagged.Also, a not about the implementation: I wasn't able to find a lot of documentation, but as far as I can tell from this, this, and this links, using
/dev/null
should be compatible with Cygwin and MinGW. And also again, I remember MacOS had a/dev/null
so I guess it should also work with it.So, if you find this feature useful, let me know of any problems of improvements, and thanks in advance for reviewing.