From 0b38b8b1d3375dda8a24c7e16cb6732a9958e874 Mon Sep 17 00:00:00 2001 From: "D. Moonfire" Date: Sun, 21 Apr 2024 01:48:32 -0500 Subject: [PATCH] docs: updating documentation --- README.md | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7b6eec0..51f0949 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,28 @@ This utility does one thing only, calculate the [semantic version]() from Git co For example, the version of "Package1" will be 1.2.4 and "Package2" will be 1.3.0 from the following commits: -- `fix: fixing package1` - - `src/package1/file1.txt` -- `feat: fixing package2` - - `src/package2/file2.txt` -- `fix: sweeping change` - - `src/package1/file.txt` - - `src/package2/file.txt` -- `feat: current version` [tagged "Package1-1.2.3", "Package2-1.2.3"] - - `src/package1/file.txt` - - `src/package2/file.txt` +``` +$ git log --name-only # filter out unimportant bits + fix: fixing package1 -In the above example, the second commit is ignored while calculating the "Package1" commits while the first one is ignored while calculating "Package2". +src/package1/file1.txt + + feat: fixing package2 + +src/package2/file2.txt + + fix: sweeping change + +src/package1/file.txt +src/package2/file.txt + + feat: current version # tagged "Package1-1.2.3" and "Package2-1.2.3" + +src/package1/file.txt +src/package2/file.txt +``` + +In the above example, the second commit is ignored while calculating the "Package1" commits which will have a new version of "1.3.0" because of the "feat" commit. While calculating "Package2", the version will be "1.2.4" because of the "fix" in the second commit because the first is ignored. If a version cannot be found, this will use `0.0.1`.