Skip to content

Commit 5211193

Browse files
committed
Updated readme
1 parent 699af38 commit 5211193

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

README.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Code Updater
22

3-
The purpose of this project is to update all code versioning and dependencies below a directory. This is useful when you have a large number of projects that you want to update all at once. This application is designed to be run on a local machine, and then the changes are committed to source control. This allows for a more controlled update process, as you can manually check the changes before committing them.
3+
The purpose of this project is to update all code versioning and dependencies below a directory. This is useful when you have a large number of projects that you want to update all at once. This application is assumed to run on a local machine, and then the changes are manually committed to source control. This allows for a more controlled update process, because a developer is meant to manually check the changes before committing them.
44

5-
## What this Updates
5+
It would be great to get this to work for all kinds of languages/frameworks someday, but for now it's just .NET and NPM.
6+
7+
## What Updates Are Done
68

79
- Updates .NET *.csproj files to use a specified C# Language Version
8-
- Updates .NET *.csproj files to use a specified .NET SDK Version (TargetFramework)
10+
- Updates .NET *.csproj files to use a specified .NET SDK Version (AKA TargetFramework element)
911
- Updates all NuGet packages in all *.csproj files to the latest version
1012
- Updates all NPM packages in all package.json files to the latest version
1113

12-
## How to Use
14+
## How to Use It
1315

14-
Remember, the purpose of this is to update code. It is assumed, and recommended, a developer runs this locally and verifies the changes before comitting to source control. Below are the steps to take.
16+
Remember, the purpose of this is to update code. It is assumed, and recommended, a developer runs this locally and verifies the changes before comitting to source control. Below are the steps assumed steps a user would follow.
1517

1618
There are 2 ways to run this. As a .NET Tool installed on your machine, or downloading the repository and running the code yourself.
1719

18-
1. Install the application
19-
- Install the tool globally by running `todo`
20-
- Clone this repository locally
20+
1. Install the application. Choose one:
21+
- Install the tool globally by running `dotnet tool install --global ProgrammerAL.Tools.CodeUpdater --version 1.0.0`
22+
- Or clone this repository locally
2123
2. Run the application
2224
- If you installed the tool, run it with the command: `code-updater --config-file "C:/my-repos/my-app-1"`
2325
- If you downloaded the code, open a terminal to the `~/src/CodeUpdater/CodeUpdater` directory and run the application using dotnet run while passing in the required arguments. Example: `dotnet run -- --config-file "C:/my-repos/my-app-1"`
2426
3. Wait for the application to finish. It will output the number of projects updated, and the number of projects that failed to update.
25-
4. Manually check a diff of all the projects to ensure everything is as you expect
27+
4. Manually check a diff of all the file changes to ensure everything is as you expect
2628
5. Commit the code changes to source control. Wait for a CI/CD pipeline to run and ensure everything is still working as expected.
2729

2830
## CLI Options
@@ -85,6 +87,21 @@ Ignore packages inside node_modules folder:
8587
- /node_modules/
8688
- \node_modules\
8789

90+
## Installing Locally vs Downloading the Code
91+
92+
The tool is very opinionated. It updates all packages to the latest version, and sets some project level properties. If the tool does some things you can't use for your projects, you can download the code, make changes, and keep thay for yourself. Maybe in the future we can hide certain settings behind a flag. Feel free to file an issue and and we can discuss it.
93+
94+
## Required 3rd Party Software
95+
96+
In order to run the tool you need the following software installed on your local machine.
97+
98+
- .NET CLI
99+
- So you can install .NET Tool from nuget.org
100+
- PowerShell
101+
- Quick Reminder: PowerShell is cross platform, you can run it on Linux and MacOS, not just Windows
102+
103+
PowerShell is required as a workaround. The NPM executable on Windows doesn't run like other applications. It doesn't exit like a normal process. I don't know why, I never spent the time figuring it out. The workaround makes PowerShell the host application so it exits like you would expect, when the process is done. For this reason, whenever an external process must be run, it's run through PowerShell. Kind of a hack, but it works well enough.
104+
88105
## .NET Standard Projects
89106

90107
When updating *.csproj files to a specific `TargetFramework` version, the project is skipped if using .NET Standard. Those are usually set for a specific level of API compatibility so we don't want to mess with those.

0 commit comments

Comments
 (0)