Interactive python script to fetch corelink source code repos for gitlab
Overview
We need to provide users an easy way to setup corelink repos on their machine rather than doing a manual clone every time via CLI. It is error prone and people tend to do it in non-standard ways leading to differences in setup.
Requirements
Write a interactive python script which
- Takes the user token and an installation path. if the installation path is not provided, assume one in a safe location.
- Do a clone on the repos and the dependencies of these repos e.g. if client depends on commons and external-dependencies, get the other 2 first and then checkout the client.
- Set the local git branch to dev so that people commit to
dev
branch by default and notmaster
branch.
Current behavior
Not applicable
Expected behavior
Please check the requirements for this. But an eventual structure should look something like this
<root>/hsrn/corelink/repo
|-corelink
|-corelink-documentation
|-corelink-client
| // others
Acceptance Criteria
- The script should ask the user for what they want to install.
- The script should install the asked component and dependencies. the dependencies may be defined statically. in the future, we might move to repo artifacts or git sub-modules to aid this.
- The script should set the local branch of all the checked out repos to dev or master as appropriate.
Testing Requirements
- The python script should do everything defined in the acceptance criteria
- This should work on windows, linux and on macOS systems.