DRAFT: add some usage info and a workspace command to make.py#740
Draft
ahs3 wants to merge 3 commits intogramps-project:maintenance/gramps60from
Draft
DRAFT: add some usage info and a workspace command to make.py#740ahs3 wants to merge 3 commits intogramps-project:maintenance/gramps60from
ahs3 wants to merge 3 commits intogramps-project:maintenance/gramps60from
Conversation
Typing ./make.py (with no arguments) used to just result in error messages
about missing values in sys.argv. Added a little bit of parameter checking,
and a usage() function so that providing no arguments, or by using any of
{-h|--help|help} as parameters will produce a message describing available
commands and options.
Signed-off-by: Al Stone <ahs3@ahs3.net>
The command "./make.py gramps60 workplace MyAddon somepath" will create the directory 'somepath', git clone the gramps, addons-source, and addons into 'somepath', create the needed 'MyAddOn' directory in addons-source, and populate it with templates for the required files. This does not handle localization yet. A small config file is created and used to track git user info, as well. Signed-off-by: Al Stone <ahs3@ahs3.net>
Instead of the workspace command duplicating the init command, make it a method that can be called instead. It doesn't really simplify the init function, but it also doesn't have to be written twice and possibly not stay in sync over time. Signed-off-by: Al Stone <ahs3@ahs3.net>
hgohel
suggested changes
Jul 24, 2025
| print(f"usage: {sys.argv[0]} <version> <command> [<options>]") | ||
| print("where:") | ||
| print(" <version> => Gramps maintenance branch name: one of") | ||
| print(" {gramps42 | gramps50 } gramps51 | gramps52 | gramps60}" ) |
Member
There was a problem hiding this comment.
Typo: should be gramps50 | as opposed to gramps50 }
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.
I kept trying to invoke "make.py --help" and nothing useful happened. So, I fixed that based on the commentary in make.py and some code reading. This will now at least provide some usage info.
More experimental is the "make.py workspace" command that was added. The intent of this command is to do the initial git repository setup for development of an addon, or maintaining the addons repo. Given a directory, it will clone the necessary repositories into the proper place under that directory, checking that forks have been made in a user's github account as well. If this is useful, excellent. If not, it is not essential to addons-source for the long term even if it is handy for some of us lazier folks.