This repository contains a collection of scripts to automate various tasks related to repository management and .NET project setup. Below is a description and usage guide for each script.
Description:
This script clones a set of repositories from GitHub that match a specific filter from a given organization. It uses the GitHub GraphQL API to fetch repository URLs and then clones them into a specified directory.
Usage:
- Replace
"your-token"
with your personal GitHub access token. - Set the
org_name
variable to the name of the GitHub organization. - Set the
repo_filter
to the specific filter term you want to match repository names against. - Set the
destination_folder
to the path where you want the repositories to be cloned.
Run the script in your terminal:
./clone-repos.sh
Description:
This script sets up a clean .NET project structure with separate layers for API, Domain, Infrastructure, and Application. It also initializes a new git repository, creates necessary .vscode configuration files, and adds project references.
Usage:
- Run the script.
- Follow the interactive prompts to input whether it is a test project, the project directory path, and names for the company and API.
Run the script in your terminal:
./create-net-project-clean.sh
To use the scripts, you may need to grant them execution permissions:
chmod +x *.sh
Ensure you have the required dependencies installed, such as git
, dotnet
, and any other tool used in the scripts.
For any issues or contributions, please open an issue or pull request in this repository.
This collection of scripts is designed to automate various tasks for .NET development, Docker container management, NuGet source handling, and Git operations. Below is a description of each script and its purpose.
Clones a filtered list of repositories from a specified GitHub organization using a personal access token. Repositories are cloned into a designated folder on the local machine.
Creates a clean .NET project structure including API, Domain, Infrastructure, and Application layers with appropriate NuGet packages and references. It also generates VS Code configuration files for debugging and tasks.
Similar to create-net-project-clean.sh
, but includes an additional Corporate class library and integration tests setup.
Uses kubectl
to find and describe a Kubernetes pod based on a substring of the pod name provided by the user.
Builds a Docker image from a specified Dockerfile and runs the container, setting the ASP.NET Core environment based on the user input.
Continuously builds a .NET project from a specified directory path, with a user-defined wait time between builds.
Removes specified NuGet sources, clears NuGet caches, and re-adds sources with new credentials provided by the user.
Checks all Git repositories within a specified directory and attempts to switch them to the develop/main
branch, reporting the status of each repository.
Each script is designed to be run from a terminal. Make sure to grant execution permissions with chmod +x <script-name>.sh
before running. For scripts that require input, follow the prompts provided by the script.
- Git installed for
clone-repos.sh
andswitch-branch.sh
- .NET SDK installed for
create-net-project*.sh
,dotnet-build.sh
, andreset-nuget-sources.sh
- Docker installed for
docker-build-run.sh
kubectl
installed and configured fordescribe_pod.sh
- jq installed for parsing JSON in
clone-repos.sh
Make sure to replace placeholder values such as personal access tokens, paths, and URLs with your actual data before running the scripts.
Feel free to fork this repository and customize the scripts as needed for your environment. Contributions and improvements are welcome through pull requests.
For detailed information on each script, refer to the comments provided at the beginning of each file.