Fix, simplify, and improve certain aspects of the project.#24
Open
wyattscarpenter wants to merge 13 commits into
Open
Fix, simplify, and improve certain aspects of the project.#24wyattscarpenter wants to merge 13 commits into
wyattscarpenter wants to merge 13 commits into
Conversation
print current tag to stderr. Tell expected tag format. Early GITHUB_TOKEN check.
8e1ba1d to
04f4bf6
Compare
perj
reviewed
Oct 11, 2024
perj
left a comment
There was a problem hiding this comment.
Thanks for the PR and sorry about the slow reply time.
I think this is a good change overall, catching problems earlier is good and I'm all for switching to f-strings.
I only really have one comment on the code, as you can see. But Codady has plenty, that should be solved.
I also think the new exit codes should be described in the README, under usage.
Comment on lines
+69
to
+78
| current_name = self.repo.git.describe(all=True) | ||
| print(f"Current name: {current_name}", file=sys.stderr) | ||
| current_tag = self.repo.rev_parse(current_name) | ||
| print(f"Current tag id: {current_tag}", file=sys.stderr) | ||
| try: | ||
| return str(tag.tag) | ||
| except AttributeError: | ||
| return str(tag) | ||
| self.current_tag = current_tag.tag | ||
| print(f"Current tag: {self.current_tag}", file=sys.stderr) | ||
| except (AttributeError, BadName, GitCommandError): | ||
| print("Not an annotated tag!", file=sys.stderr) | ||
| exit(4) |
There was a problem hiding this comment.
Since GitCommandError is caught here, I think you might've meant to include the git calls inside the try block.
Author
|
Glad to hear it! I'll try to fix all these things soon :) |
This file contains hidden or 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
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.
Recently, I began to use Publish for myself, as it sort of matches my workflow. While trying it out, I encountered several errors and edge cases, which I have now fixed. Here is an abridged listing of my changes: