diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..f764ecd --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,275 @@ +.highlight table td { padding: 5px; } + +.highlight table pre { margin: 0; } + +.highlight .cm { color: #777772; font-style: italic; } + +.highlight .cp { color: #797676; font-weight: bold; } + +.highlight .c1 { color: #777772; font-style: italic; } + +.highlight .cs { color: #797676; font-weight: bold; font-style: italic; } + +.highlight .c, .highlight .cd { color: #777772; font-style: italic; } + +.highlight .err { color: #a61717; background-color: #e3d2d2; } + +.highlight .gd { color: #000000; background-color: #ffdddd; } + +.highlight .ge { color: #000000; font-style: italic; } + +.highlight .gr { color: #aa0000; } + +.highlight .gh { color: #797676; } + +.highlight .gi { color: #000000; background-color: #ddffdd; } + +.highlight .go { color: #888888; } + +.highlight .gp { color: #555555; } + +.highlight .gs { font-weight: bold; } + +.highlight .gu { color: #aaaaaa; } + +.highlight .gt { color: #aa0000; } + +.highlight .kc { color: #000000; font-weight: bold; } + +.highlight .kd { color: #000000; font-weight: bold; } + +.highlight .kn { color: #000000; font-weight: bold; } + +.highlight .kp { color: #000000; font-weight: bold; } + +.highlight .kr { color: #000000; font-weight: bold; } + +.highlight .kt { color: #445588; font-weight: bold; } + +.highlight .k, .highlight .kv { color: #000000; font-weight: bold; } + +.highlight .mf { color: #009999; } + +.highlight .mh { color: #009999; } + +.highlight .il { color: #009999; } + +.highlight .mi { color: #009999; } + +.highlight .mo { color: #009999; } + +.highlight .m, .highlight .mb, .highlight .mx { color: #009999; } + +.highlight .sb { color: #d14; } + +.highlight .sc { color: #d14; } + +.highlight .sd { color: #d14; } + +.highlight .s2 { color: #d14; } + +.highlight .se { color: #d14; } + +.highlight .sh { color: #d14; } + +.highlight .si { color: #d14; } + +.highlight .sx { color: #d14; } + +.highlight .sr { color: #009926; } + +.highlight .s1 { color: #d14; } + +.highlight .ss { color: #990073; } + +.highlight .s { color: #d14; } + +.highlight .na { color: #008080; } + +.highlight .bp { color: #797676; } + +.highlight .nb { color: #0086B3; } + +.highlight .nc { color: #445588; font-weight: bold; } + +.highlight .no { color: #008080; } + +.highlight .nd { color: #3c5d5d; font-weight: bold; } + +.highlight .ni { color: #800080; } + +.highlight .ne { color: #990000; font-weight: bold; } + +.highlight .nf { color: #990000; font-weight: bold; } + +.highlight .nl { color: #990000; font-weight: bold; } + +.highlight .nn { color: #555555; } + +.highlight .nt { color: #000080; } + +.highlight .vc { color: #008080; } + +.highlight .vg { color: #008080; } + +.highlight .vi { color: #008080; } + +.highlight .nv { color: #008080; } + +.highlight .ow { color: #000000; font-weight: bold; } + +.highlight .o { color: #000000; font-weight: bold; } + +.highlight .w { color: #bbbbbb; } + +.highlight { background-color: #f8f8f8; } + +/******************************************************************************* +MeyerWeb Reset +*******************************************************************************/ +html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline; } + +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } + +ol, ul { list-style: none; } + +table { border-collapse: collapse; border-spacing: 0; } + +/******************************************************************************* +Theme Styles +*******************************************************************************/ +body { box-sizing: border-box; color: #373737; background: #212121; font-size: 16px; font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; } + +h1, h2, h3, h4, h5, h6 { margin: 10px 0; font-weight: 700; color: #222222; font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif; letter-spacing: -1px; } + +h1 { font-size: 36px; font-weight: 700; } + +h2 { padding-bottom: 10px; font-size: 32px; background: url("../images/bg_hr.png") repeat-x bottom; } + +h3 { font-size: 24px; } + +h4 { font-size: 21px; } + +h5 { font-size: 18px; } + +h6 { font-size: 16px; } + +p { margin: 10px 0 15px 0; } + +footer p { color: #f2f2f2; } + +a { text-decoration: none; color: #0F79D0; text-shadow: none; transition: color 0.5s ease; transition: text-shadow 0.5s ease; -webkit-transition: color 0.5s ease; -webkit-transition: text-shadow 0.5s ease; -moz-transition: color 0.5s ease; -moz-transition: text-shadow 0.5s ease; -o-transition: color 0.5s ease; -o-transition: text-shadow 0.5s ease; -ms-transition: color 0.5s ease; -ms-transition: text-shadow 0.5s ease; } + +a:hover, a:focus { text-decoration: underline; } + +footer a { color: #F2F2F2; text-decoration: underline; } + +em, cite { font-style: italic; } + +strong { font-weight: bold; } + +img { position: relative; margin: 0 auto; max-width: 739px; padding: 5px; margin: 10px 0 10px 0; border: 1px solid #ebebeb; box-shadow: 0 0 5px #ebebeb; -webkit-box-shadow: 0 0 5px #ebebeb; -moz-box-shadow: 0 0 5px #ebebeb; -o-box-shadow: 0 0 5px #ebebeb; -ms-box-shadow: 0 0 5px #ebebeb; } + +p img { display: inline; margin: 0; padding: 0; vertical-align: middle; text-align: center; border: none; } + +pre, code { color: #222; background-color: #fff; font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; font-size: 0.875em; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } + +pre { padding: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); overflow: auto; } + +code { padding: 3px; margin: 0 3px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } + +pre code { display: block; box-shadow: none; } + +blockquote { color: #666; margin-bottom: 20px; padding: 0 0 0 20px; border-left: 3px solid #bbb; } + +ul, ol, dl { margin-bottom: 15px; } + +ul { list-style-position: inside; list-style: disc; padding-left: 20px; } + +ol { list-style-position: inside; list-style: decimal; padding-left: 20px; } + +dl dt { font-weight: bold; } + +dl dd { padding-left: 20px; font-style: italic; } + +dl p { padding-left: 20px; font-style: italic; } + +hr { height: 1px; margin-bottom: 5px; border: none; background: url("../images/bg_hr.png") repeat-x center; } + +table { border: 1px solid #373737; margin-bottom: 20px; text-align: left; } + +th { font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 10px; background: #373737; color: #fff; } + +td { padding: 10px; border: 1px solid #373737; } + +form { background: #f2f2f2; padding: 20px; } + +kbd { background-color: #fafbfc; border: 1px solid #c6cbd1; border-bottom-color: #959da5; border-radius: 3px; box-shadow: inset 0 -1px 0 #959da5; color: #444d56; display: inline-block; font-size: 11px; line-height: 11px; padding: 3px 5px; vertical-align: middle; } + +/******************************************************************************* +Full-Width Styles +*******************************************************************************/ +.outer { width: 100%; } + +.inner { position: relative; max-width: 640px; padding: 20px 10px; margin: 0 auto; } + +#forkme_banner { display: block; position: absolute; top: 0; right: 10px; z-index: 10; padding: 10px 50px 10px 10px; color: #fff; background: url("../images/blacktocat.png") #0090ff no-repeat 95% 50%; font-weight: 700; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; } + +#header_wrap { background: #212121; background: -moz-linear-gradient(top, #373737, #212121); background: -webkit-linear-gradient(top, #373737, #212121); background: -ms-linear-gradient(top, #373737, #212121); background: -o-linear-gradient(top, #373737, #212121); background: linear-gradient(to top, #373737, #212121); } + +#header_wrap .inner { padding: 50px 10px 30px 10px; } + +#project_title { margin: 0; color: #fff; font-size: 42px; font-weight: 700; text-shadow: #111 0px 0px 10px; } + +#project_tagline { color: #fff; font-size: 24px; font-weight: 300; background: none; text-shadow: #111 0px 0px 10px; } + +#downloads { position: absolute; width: 210px; z-index: 10; bottom: -40px; right: 0; height: 70px; background: url("../images/icon_download.png") no-repeat 0% 90%; } + +.zip_download_link { display: block; float: right; width: 90px; height: 70px; text-indent: -5000px; overflow: hidden; background: url(../images/sprite_download.png) no-repeat bottom left; } + +.tar_download_link { display: block; float: right; width: 90px; height: 70px; text-indent: -5000px; overflow: hidden; background: url(../images/sprite_download.png) no-repeat bottom right; margin-left: 10px; } + +.zip_download_link:hover { background: url(../images/sprite_download.png) no-repeat top left; } + +.tar_download_link:hover { background: url(../images/sprite_download.png) no-repeat top right; } + +#main_content_wrap { background: #f2f2f2; border-top: 1px solid #111; border-bottom: 1px solid #111; } + +#main_content { padding-top: 40px; } + +#footer_wrap { background: #212121; } + +/******************************************************************************* +Small Device Styles +*******************************************************************************/ +@media screen and (max-width: 992px) { img { max-width: 100%; } } +@media screen and (max-width: 480px) { body { font-size: 14px; } + #downloads { display: none; } + .inner { min-width: 320px; max-width: 480px; } + #project_title { font-size: 32px; } + h1 { font-size: 28px; } + h2 { font-size: 24px; } + h3 { font-size: 21px; } + h4 { font-size: 18px; } + h5 { font-size: 14px; } + h6 { font-size: 12px; } + code, pre { font-size: 11px; } } +@media screen and (max-width: 320px) { body { font-size: 14px; } + #downloads { display: none; } + .inner { min-width: 240px; max-width: 320px; } + #project_title { font-size: 28px; } + h1 { font-size: 24px; } + h2 { font-size: 21px; } + h3 { font-size: 18px; } + h4 { font-size: 16px; } + h5 { font-size: 14px; } + h6 { font-size: 12px; } + code, pre { min-width: 240px; max-width: 320px; font-size: 11px; } } +.inner { max-width: 960px; } + +pre, code { background-color: unset; font-size: unset; } + +code { font-size: 0.80em; } + +h1 > img { border: unset; box-shadow: unset; vertical-align: middle; -moz-box-shadow: unset; -o-box-shadow: unset; -ms-box-shadow: unset; } diff --git a/assets/images/bg_hr.png b/assets/images/bg_hr.png new file mode 100644 index 0000000..514aee5 Binary files /dev/null and b/assets/images/bg_hr.png differ diff --git a/assets/images/blacktocat.png b/assets/images/blacktocat.png new file mode 100644 index 0000000..e160053 Binary files /dev/null and b/assets/images/blacktocat.png differ diff --git a/assets/images/git.png b/assets/images/git.png new file mode 100644 index 0000000..2aa06fe Binary files /dev/null and b/assets/images/git.png differ diff --git a/assets/images/git.svg b/assets/images/git.svg new file mode 100644 index 0000000..deda0cf --- /dev/null +++ b/assets/images/git.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/assets/images/icon_download.png b/assets/images/icon_download.png new file mode 100644 index 0000000..5a793f1 Binary files /dev/null and b/assets/images/icon_download.png differ diff --git a/assets/images/sprite_download.png b/assets/images/sprite_download.png new file mode 100644 index 0000000..f9f8de2 Binary files /dev/null and b/assets/images/sprite_download.png differ diff --git a/assets/images/tooltip.png b/assets/images/tooltip.png new file mode 100644 index 0000000..1e65e7a Binary files /dev/null and b/assets/images/tooltip.png differ diff --git a/changelog.html b/changelog.html new file mode 100644 index 0000000..257d799 --- /dev/null +++ b/changelog.html @@ -0,0 +1,602 @@ + + + + + + + + + + +Changelog | GitInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + View on GitHub + + +

GitInfo

+

Git and SemVer Info from MSBuild, C# and VB

+ + +
+
+ + +
+
+

Changelog

+ +

v3.5.0 (2024-11-02)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:hammer: Other:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.3.5 (2024-05-13)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

v3.3.4 (2024-02-15)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.3.3 (2023-08-30)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.3.2 (2023-08-30)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

v3.3.1 (2023-08-11)

+ +

Full Changelog

+ +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.3.0 (2023-08-11)

+ +

Full Changelog

+ +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.2.0 (2023-08-11)

+ +

Full Changelog

+ +

v3.1.2 (2023-08-02)

+ +

Full Changelog

+ +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.1.1 (2023-07-07)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

v3.1.0 (2023-06-05)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

v3.0.7 (2023-06-05)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

v3.0.6 (2023-05-05)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.0.5 (2023-03-22)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.0.4 (2023-02-22)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

v3.0.2 (2023-02-18)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

v3.0.1 (2023-02-17)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

v3.0.0 (2023-02-16)

+ +

Full Changelog

+ +

:twisted_rightwards_arrows: Merged:

+ + + +

v3.0.0-rc (2023-02-09)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

v3.0.0-alpha (2023-02-07)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

:hammer: Other:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v2.3.0 (2022-11-18)

+ +

Full Changelog

+ +

:bug: Fixed bugs:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v2.2.1 (2022-11-16)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

:hammer: Other:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v2.2.0 (2021-08-25)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:bug: Fixed bugs:

+ + + +

:hammer: Other:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

v2.1.2 (2020-09-24)

+ +

Full Changelog

+ +

:sparkles: Implemented enhancements:

+ + + +

:hammer: Other:

+ + + +

:twisted_rightwards_arrows: Merged:

+ + + +

* This Changelog was automatically generated by github_changelog_generator

+ +
+
+ + + + + diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..0202d86 --- /dev/null +++ b/changelog.md @@ -0,0 +1,445 @@ +# Changelog + +## [v3.5.0](https://github.com/devlooped/GitInfo/tree/v3.5.0) (2024-11-02) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.5...v3.5.0) + +:sparkles: Implemented enhancements: + +- Question: Why we use git log with format to get the Current commit? [\#355](https://github.com/devlooped/GitInfo/issues/355) +- SetGitExe doesn't recognize VS Git locations [\#324](https://github.com/devlooped/GitInfo/issues/324) +- Projects don't rebuild after committing [\#322](https://github.com/devlooped/GitInfo/issues/322) +- New tag without version drop semver to zeros [\#319](https://github.com/devlooped/GitInfo/issues/319) +- Add vswhere fallback to locate git provided by VS [\#372](https://github.com/devlooped/GitInfo/pull/372) (@kzu) +- Simplify IsDirty with newer typed constants in ThisAssembly [\#368](https://github.com/devlooped/GitInfo/pull/368) (@kzu) +- Allow opting-out of GitBranch default in CI [\#366](https://github.com/devlooped/GitInfo/pull/366) (@kzu) +- Set default GitBranch from CI env variables [\#365](https://github.com/devlooped/GitInfo/pull/365) (@kzu) +- Using simpler git command to get current commit [\#356](https://github.com/devlooped/GitInfo/pull/356) (@kzu) + +:hammer: Other: + +- Using GitInfo with Ncrunch [\#345](https://github.com/devlooped/GitInfo/issues/345) + +:twisted_rightwards_arrows: Merged: + +- Adopt SL v2 via ThisAssembly.Constants and document in readme\(s\) [\#370](https://github.com/devlooped/GitInfo/pull/370) (@kzu) +- +Mᐁ includes [\#367](https://github.com/devlooped/GitInfo/pull/367) (@devlooped-bot) +- +Mᐁ includes [\#357](https://github.com/devlooped/GitInfo/pull/357) (@devlooped-bot) +- Clean code [\#352](https://github.com/devlooped/GitInfo/pull/352) (@gitfool) +- Remove redundant depends on targets [\#346](https://github.com/devlooped/GitInfo/pull/346) (@gitfool) +- Fix fast up-to-date-check [\#343](https://github.com/devlooped/GitInfo/pull/343) (@gitfool) +- Disable rogue command echo [\#342](https://github.com/devlooped/GitInfo/pull/342) (@gitfool) + +## [v3.3.5](https://github.com/devlooped/GitInfo/tree/v3.3.5) (2024-05-13) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.4...v3.3.5) + +:sparkles: Implemented enhancements: + +- Can not find all git info when on branch with '.' in the name [\#328](https://github.com/devlooped/GitInfo/issues/328) + +:bug: Fixed bugs: + +- `ThisAssembly.Git.IsDirty` is included when `GitThisAssembly` is false [\#337](https://github.com/devlooped/GitInfo/issues/337) +- Update to 3.3.4 via Nuget crashes [\#335](https://github.com/devlooped/GitInfo/issues/335) +- Git.Branch always gives \[HEAD\] for detached HEAD commit. [\#333](https://github.com/devlooped/GitInfo/issues/333) +- Do not emit ThisAssembly.Git.IsDirty when GitThisAssembly is false [\#338](https://github.com/devlooped/GitInfo/pull/338) (@kzu) + +## [v3.3.4](https://github.com/devlooped/GitInfo/tree/v3.3.4) (2024-02-15) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.3...v3.3.4) + +:bug: Fixed bugs: + +- GetInfo 3.3.3 fails like \#273 \('ThisAssembly.Git' is inaccessible...\) on non-SDK style .csproj, 2.3.0 works fine [\#326](https://github.com/devlooped/GitInfo/issues/326) +- Weird race condition with targets [\#321](https://github.com/devlooped/GitInfo/issues/321) + +:twisted_rightwards_arrows: Merged: + +- Fix race conditions [\#330](https://github.com/devlooped/GitInfo/pull/330) (@gitfool) + +## [v3.3.3](https://github.com/devlooped/GitInfo/tree/v3.3.3) (2023-08-30) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.2...v3.3.3) + +:bug: Fixed bugs: + +- parse\(''\)" cannot be evaluated. version string portion was too short or too long [\#300](https://github.com/devlooped/GitInfo/issues/300) +- Shield from invalid git version [\#313](https://github.com/devlooped/GitInfo/pull/313) (@kzu) + +:twisted_rightwards_arrows: Merged: + +- +Mᐁ includes [\#315](https://github.com/devlooped/GitInfo/pull/315) (@devlooped-bot) + +## [v3.3.2](https://github.com/devlooped/GitInfo/tree/v3.3.2) (2023-08-30) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.1...v3.3.2) + +:bug: Fixed bugs: + +- LangVersion latest and using 11.0 constants [\#311](https://github.com/devlooped/GitInfo/issues/311) +- Privacy about SponsorLink with GitInfo [\#299](https://github.com/devlooped/GitInfo/issues/299) +- Linux compatibility issues? [\#298](https://github.com/devlooped/GitInfo/issues/298) +- Bump ThisAssembly to get fix for C\#11 raw strings [\#312](https://github.com/devlooped/GitInfo/pull/312) (@kzu) + +## [v3.3.1](https://github.com/devlooped/GitInfo/tree/v3.3.1) (2023-08-11) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.3.0...v3.3.1) + +:twisted_rightwards_arrows: Merged: + +- Bump to downstream ThisAssembly without SponsorLink [\#305](https://github.com/devlooped/GitInfo/pull/305) (@kzu) +- +Mᐁ includes [\#303](https://github.com/devlooped/GitInfo/pull/303) (@devlooped-bot) + +## [v3.3.0](https://github.com/devlooped/GitInfo/tree/v3.3.0) (2023-08-11) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.2.0...v3.3.0) + +:twisted_rightwards_arrows: Merged: + +- Remove current implementation of SponsorLink for now [\#302](https://github.com/devlooped/GitInfo/pull/302) (@kzu) + +## [v3.2.0](https://github.com/devlooped/GitInfo/tree/v3.2.0) (2023-08-11) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.1.2...v3.2.0) + +## [v3.1.2](https://github.com/devlooped/GitInfo/tree/v3.1.2) (2023-08-02) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.1.1...v3.1.2) + +:twisted_rightwards_arrows: Merged: + +- replace all invalid chars in semver string with "-" [\#295](https://github.com/devlooped/GitInfo/pull/295) (@smorokin) + +## [v3.1.1](https://github.com/devlooped/GitInfo/tree/v3.1.1) (2023-07-07) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.1.0...v3.1.1) + +:bug: Fixed bugs: + +- IsDirty is no more constant [\#287](https://github.com/devlooped/GitInfo/issues/287) +- IsDirty always false [\#285](https://github.com/devlooped/GitInfo/issues/285) + +## [v3.1.0](https://github.com/devlooped/GitInfo/tree/v3.1.0) (2023-06-05) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.7...v3.1.0) + +:bug: Fixed bugs: + +- Ensure IsDirty is a constant [\#288](https://github.com/devlooped/GitInfo/pull/288) (@kzu) + +## [v3.0.7](https://github.com/devlooped/GitInfo/tree/v3.0.7) (2023-06-05) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.6...v3.0.7) + +:sparkles: Implemented enhancements: + +- Branch name is wrong when compiling from a git worktree [\#189](https://github.com/devlooped/GitInfo/issues/189) + +:bug: Fixed bugs: + +- Version 3.0.5: Error 'ThisAssembly.Git' is inaccessible due to its protection level [\#273](https://github.com/devlooped/GitInfo/issues/273) + +## [v3.0.6](https://github.com/devlooped/GitInfo/tree/v3.0.6) (2023-05-05) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.5...v3.0.6) + +:sparkles: Implemented enhancements: + +- Allow forcing templated code gen for C\# [\#269](https://github.com/devlooped/GitInfo/pull/269) (@kzu) + +:bug: Fixed bugs: + +- The name 'IsDirtyString' does not exist in the current context [\#281](https://github.com/devlooped/GitInfo/issues/281) +- Update to version 3.x breaks Avalonia projects [\#260](https://github.com/devlooped/GitInfo/issues/260) +- CSC : error SL01: SponsorLink has been incorrectly configured [\#251](https://github.com/devlooped/GitInfo/issues/251) +- Fix missing code from missing dependency [\#282](https://github.com/devlooped/GitInfo/pull/282) (@kzu) + +:twisted_rightwards_arrows: Merged: + +- Additional bump to get complete fix [\#283](https://github.com/devlooped/GitInfo/pull/283) (@kzu) + +## [v3.0.5](https://github.com/devlooped/GitInfo/tree/v3.0.5) (2023-03-22) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.4...v3.0.5) + +:bug: Fixed bugs: + +- ThisAssemblyNamespace is ignored when updating from 2.3.0 to 3.0.4 [\#258](https://github.com/devlooped/GitInfo/issues/258) +- Bump to ThisAssembly version that doesn't run so early [\#268](https://github.com/devlooped/GitInfo/pull/268) (@kzu) +- Fix IsDirty generator when using a custom namespace [\#267](https://github.com/devlooped/GitInfo/pull/267) (@kzu) +- Fix backs-compat generation when custom namespace in use [\#266](https://github.com/devlooped/GitInfo/pull/266) (@kzu) + +:twisted_rightwards_arrows: Merged: + +- fix typo 'alwas' with 'always' [\#257](https://github.com/devlooped/GitInfo/pull/257) (@codingdave) +- Set AzureDevOps branch name also for PR [\#256](https://github.com/devlooped/GitInfo/pull/256) (@trejjam) + +## [v3.0.4](https://github.com/devlooped/GitInfo/tree/v3.0.4) (2023-02-22) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.2...v3.0.4) + +:bug: Fixed bugs: + +- Branch Names with '/' generate invalid versions [\#244](https://github.com/devlooped/GitInfo/issues/244) +- V3 IsDirty is a string [\#243](https://github.com/devlooped/GitInfo/issues/243) +- Migration from v2 -\> v3 [\#240](https://github.com/devlooped/GitInfo/issues/240) +- Reintroduce IsDirty boolean property from 2.3 [\#249](https://github.com/devlooped/GitInfo/pull/249) (@kzu) +- Replace / and \ in branches with dashes when setting default Version [\#248](https://github.com/devlooped/GitInfo/pull/248) (@kzu) + +## [v3.0.2](https://github.com/devlooped/GitInfo/tree/v3.0.2) (2023-02-18) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.1...v3.0.2) + +:sparkles: Implemented enhancements: + +- 💜 Bump SponsorLink for better privacy [\#242](https://github.com/devlooped/GitInfo/pull/242) (@kzu) + +## [v3.0.1](https://github.com/devlooped/GitInfo/tree/v3.0.1) (2023-02-17) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.0...v3.0.1) + +:sparkles: Implemented enhancements: + +- Make sure we don't surface SponsorLink as an API [\#241](https://github.com/devlooped/GitInfo/pull/241) (@kzu) + +## [v3.0.0](https://github.com/devlooped/GitInfo/tree/v3.0.0) (2023-02-16) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.0-rc...v3.0.0) + +:twisted_rightwards_arrows: Merged: + +- Rename Analyzer \> GitInfo.CodeAnalysis [\#233](https://github.com/devlooped/GitInfo/pull/233) (@kzu) + +## [v3.0.0-rc](https://github.com/devlooped/GitInfo/tree/v3.0.0-rc) (2023-02-09) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v3.0.0-alpha...v3.0.0-rc) + +:sparkles: Implemented enhancements: + +- Set Version and PackageVersion to a default value [\#232](https://github.com/devlooped/GitInfo/pull/232) (@kzu) + +## [v3.0.0-alpha](https://github.com/devlooped/GitInfo/tree/v3.0.0-alpha) (2023-02-07) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v2.3.0...v3.0.0-alpha) + +:sparkles: Implemented enhancements: + +- Stale info on unrelated changes [\#186](https://github.com/devlooped/GitInfo/issues/186) +- Should `$(GitDefaultBranch)` now default to `main` rather than `master` [\#167](https://github.com/devlooped/GitInfo/issues/167) +- Integrate better with SourceLink and built-in support in the SDK [\#128](https://github.com/devlooped/GitInfo/issues/128) +- Switch to ThisAssembly.Constants for C\# [\#229](https://github.com/devlooped/GitInfo/pull/229) (@kzu) +- Properly detect HEAD changes for incremental builds [\#226](https://github.com/devlooped/GitInfo/pull/226) (@kzu) +- Change GitDefaultBranch to `main` instead of `master` [\#225](https://github.com/devlooped/GitInfo/pull/225) (@kzu) +- Improve targets organization by moving ThisAssembly to another targets [\#219](https://github.com/devlooped/GitInfo/pull/219) (@kzu) +- Switch to built-in .NET SDK AssemblyMetadata support [\#218](https://github.com/devlooped/GitInfo/pull/218) (@kzu) + +:bug: Fixed bugs: + +- Missing Git Information with Docker build [\#216](https://github.com/devlooped/GitInfo/issues/216) +- Version issue with Multi-target projects [\#202](https://github.com/devlooped/GitInfo/issues/202) +- Git isDirty triggers rebuilds [\#183](https://github.com/devlooped/GitInfo/issues/183) +- GitInfo.cache collects warnings which leads to build errors [\#91](https://github.com/devlooped/GitInfo/issues/91) + +:hammer: Other: + +- $\(GitBranch\) prop value is empty in .csproj file [\#178](https://github.com/devlooped/GitInfo/issues/178) + +:twisted_rightwards_arrows: Merged: + +- Delete removed define for assembly metadata [\#220](https://github.com/devlooped/GitInfo/pull/220) (@kzu) + +## [v2.3.0](https://github.com/devlooped/GitInfo/tree/v2.3.0) (2022-11-18) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v2.2.1...v2.3.0) + +:bug: Fixed bugs: + +- make the gitinfo caches location configurable to be able to reuse the same information over several projects that are built [\#190](https://github.com/devlooped/GitInfo/issues/190) + +:twisted_rightwards_arrows: Merged: + +- Feature/use git info cache for all solution projects [\#191](https://github.com/devlooped/GitInfo/pull/191) (@tisis2) + +## [v2.2.1](https://github.com/devlooped/GitInfo/tree/v2.2.1) (2022-11-16) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v2.2.0...v2.2.1) + +:sparkles: Implemented enhancements: + +- maybe: show better error msg if windows visual studio git outputs linux paths [\#131](https://github.com/devlooped/GitInfo/issues/131) +- Add release notes [\#89](https://github.com/devlooped/GitInfo/issues/89) +- Can the same be used for managed C++? If not create it? [\#67](https://github.com/devlooped/GitInfo/issues/67) +- Cake: Use within Cake [\#48](https://github.com/devlooped/GitInfo/issues/48) +- Doesn't work with projects on SMB shares [\#8](https://github.com/devlooped/GitInfo/issues/8) +- Add section on how to set versions from MSBuild [\#211](https://github.com/devlooped/GitInfo/pull/211) (@kzu) +- Fix "MSBuild customizations" misnomer & add link to documentation [\#206](https://github.com/devlooped/GitInfo/pull/206) (@JimmyCushnie) +- fix bug Branch name is wrong when compiling from a git worktree [\#197](https://github.com/devlooped/GitInfo/pull/197) (@li-zhixin) +- Properly escape GitExe and CygPathExe for WSL [\#195](https://github.com/devlooped/GitInfo/pull/195) (@socram8888) +- Update "dirty" file only when `GitIsDirty` changes [\#184](https://github.com/devlooped/GitInfo/pull/184) (@AmoreCadenza) +- Fix of buildTransitive feature of package [\#182](https://github.com/devlooped/GitInfo/pull/182) (@PadreSVK) + +:bug: Fixed bugs: + +- MSBuild variables don't work for MAUI projects [\#203](https://github.com/devlooped/GitInfo/issues/203) +- Execution fails if using WSL and username contains spaces [\#194](https://github.com/devlooped/GitInfo/issues/194) +- delete [\#193](https://github.com/devlooped/GitInfo/issues/193) +- \[Question\] Commit Message [\#185](https://github.com/devlooped/GitInfo/issues/185) +- Build fails if `git config log.showSignature true` [\#180](https://github.com/devlooped/GitInfo/issues/180) +- Disable signatures when obtaining commit date - fixes \#180 [\#213](https://github.com/devlooped/GitInfo/pull/213) (@socram8888) + +:hammer: Other: + +- Deleted [\#181](https://github.com/devlooped/GitInfo/issues/181) +- Publish new version to nuget.org [\#159](https://github.com/devlooped/GitInfo/issues/159) + +:twisted_rightwards_arrows: Merged: + +- +Mᐁ includes [\#207](https://github.com/devlooped/GitInfo/pull/207) (@devlooped-bot) +- +M▼ includes [\#200](https://github.com/devlooped/GitInfo/pull/200) (@github-actions[bot]) +- Integrate .csproj section on code example on README.md [\#173](https://github.com/devlooped/GitInfo/pull/173) (@paonath) + +## [v2.2.0](https://github.com/devlooped/GitInfo/tree/v2.2.0) (2021-08-25) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/v2.1.2...v2.2.0) + +:sparkles: Implemented enhancements: + +- Add source repository information to package [\#169](https://github.com/devlooped/GitInfo/issues/169) +- Add support for nuget transitive dependencies \(via PackageReference\) [\#154](https://github.com/devlooped/GitInfo/issues/154) +- GitThisAssemblyMetadata documentation is confusing [\#152](https://github.com/devlooped/GitInfo/issues/152) +- Feature request: let \_CommitDateFormat be configurable [\#144](https://github.com/devlooped/GitInfo/issues/144) +- Build error when the first commit on a new branch is a cherry pick [\#133](https://github.com/devlooped/GitInfo/issues/133) +- support for git worktree [\#88](https://github.com/devlooped/GitInfo/issues/88) +- Issue with GitIsDirty and GitCache [\#60](https://github.com/devlooped/GitInfo/issues/60) + +:bug: Fixed bugs: + +- Handle add non-zero exit codes from Git [\#147](https://github.com/devlooped/GitInfo/pull/147) (@Therzok) + +:hammer: Other: + +- Project URL should be devlooped.github.io/GitInfo [\#149](https://github.com/devlooped/GitInfo/issues/149) + +:twisted_rightwards_arrows: Merged: + +- 🖆 Apply devlooped/oss template, nugetize and modernize [\#168](https://github.com/devlooped/GitInfo/pull/168) (@kzu) +- Is dirty always check [\#165](https://github.com/devlooped/GitInfo/pull/165) (@freza-tm) +- Add support for nuget transitive dependecy for .targets [\#155](https://github.com/devlooped/GitInfo/pull/155) (@PadreSVK) +- Updating content readme.txt for issue \#152 [\#153](https://github.com/devlooped/GitInfo/pull/153) (@daiplusplus) +- Allowed git commit date format to be configured through GitCommitDateFormat property [\#145](https://github.com/devlooped/GitInfo/pull/145) (@tomcurran) +- Add --always to default name-rev args, so a commit hash is used instead of 'undefined' [\#132](https://github.com/devlooped/GitInfo/pull/132) (@andersforsgren) + +## [v2.1.2](https://github.com/devlooped/GitInfo/tree/v2.1.2) (2020-09-24) + +[Full Changelog](https://github.com/devlooped/GitInfo/compare/89d9e9d5e61e983f507cd1fd2133ee23dd3b6af2...v2.1.2) + +:sparkles: Implemented enhancements: + +- Option to exclude merges when calculating SemVerPatch [\#124](https://github.com/devlooped/GitInfo/issues/124) +- RepositoryUrl may contain username and password [\#122](https://github.com/devlooped/GitInfo/issues/122) +- Folder Syntax are not supported [\#101](https://github.com/devlooped/GitInfo/issues/101) +- Only consider version tags [\#100](https://github.com/devlooped/GitInfo/issues/100) +- Add "CheckinDate" to the ThisAssembly to be used in AssemblyInfo [\#65](https://github.com/devlooped/GitInfo/issues/65) +- Error when the path to file GitInfo.txt contains spaces [\#13](https://github.com/devlooped/GitInfo/issues/13) +- Include boolean indicating whether working tree is dirty [\#10](https://github.com/devlooped/GitInfo/issues/10) +- GitExe in the PATH should be first [\#6](https://github.com/devlooped/GitInfo/issues/6) +- Thoughts on including date information [\#2](https://github.com/devlooped/GitInfo/issues/2) + +:hammer: Other: + +- Possibility to exclude tag refs from $\(GitBranch\) [\#126](https://github.com/devlooped/GitInfo/issues/126) +- "Unrecognized escape sequence" when remote url is a Windows path [\#119](https://github.com/devlooped/GitInfo/issues/119) +- GitSemVerPatch always 0 after update from 2.0.26 to 2.0.29 [\#116](https://github.com/devlooped/GitInfo/issues/116) +- Add GitSha override when building [\#114](https://github.com/devlooped/GitInfo/issues/114) +- Use MSBuild property to determine base version instead of external file [\#113](https://github.com/devlooped/GitInfo/issues/113) +- \[Feature\] Retrieve repository url [\#109](https://github.com/devlooped/GitInfo/issues/109) +- ASP.NET Core 3.1 GitThisAssemblyMetadata setting? [\#108](https://github.com/devlooped/GitInfo/issues/108) +- Change ThisAssembly access to Public [\#107](https://github.com/devlooped/GitInfo/issues/107) +- Include origin in git info [\#103](https://github.com/devlooped/GitInfo/issues/103) +- Can't Get BaseVersion.Patch+1 [\#99](https://github.com/devlooped/GitInfo/issues/99) +- Build fails if `git config log.showSignature true` [\#86](https://github.com/devlooped/GitInfo/issues/86) +- Emit assembly attributes [\#85](https://github.com/devlooped/GitInfo/issues/85) +- Conflicts when using InternalsVisibleTo [\#84](https://github.com/devlooped/GitInfo/issues/84) +- Broken link [\#83](https://github.com/devlooped/GitInfo/issues/83) +- Incremental build is broken [\#81](https://github.com/devlooped/GitInfo/issues/81) +- dotnet tool [\#79](https://github.com/devlooped/GitInfo/issues/79) +- Question regarding ThisAssembly.Git.Tag - separate commit using a plus? [\#78](https://github.com/devlooped/GitInfo/issues/78) +- Is there a way to make GitInfo work with Xamarin Live Player [\#77](https://github.com/devlooped/GitInfo/issues/77) +- GitInfo.txt per project leaves GitSemVerPatch at zero [\#76](https://github.com/devlooped/GitInfo/issues/76) +- How to add pre-release information only if building from dev branches or on dev box [\#70](https://github.com/devlooped/GitInfo/issues/70) +- Default protection level of ThisAssembly [\#69](https://github.com/devlooped/GitInfo/issues/69) +- Info on target \(release/debug/...\)? [\#68](https://github.com/devlooped/GitInfo/issues/68) +- csproj example [\#62](https://github.com/devlooped/GitInfo/issues/62) +- Cannot use on OSX [\#61](https://github.com/devlooped/GitInfo/issues/61) +- Preffered Version Scheme [\#59](https://github.com/devlooped/GitInfo/issues/59) +- naming clash? "ThisAssembly" exists in Microsoft.Build.Utilities.v4.0 [\#56](https://github.com/devlooped/GitInfo/issues/56) +- Cannot access internal class "ThisAssembly" here [\#55](https://github.com/devlooped/GitInfo/issues/55) +- Commits not counting correctly when base branch is already ahead [\#54](https://github.com/devlooped/GitInfo/issues/54) +- Examples to increase the counters. [\#49](https://github.com/devlooped/GitInfo/issues/49) +- Clean up the output by using EchoOff for Exec [\#47](https://github.com/devlooped/GitInfo/issues/47) +- If no Git found, build should fail [\#46](https://github.com/devlooped/GitInfo/issues/46) +- HOWTO dotnet core nuget versioning [\#45](https://github.com/devlooped/GitInfo/issues/45) +- Using GitInfo in a WPF app causes build failure [\#44](https://github.com/devlooped/GitInfo/issues/44) +- Assembly Metadata IsDirty must be a string [\#43](https://github.com/devlooped/GitInfo/issues/43) +- Build fails from dotnet publish [\#41](https://github.com/devlooped/GitInfo/issues/41) +- Templates should have the \ tag as first line [\#39](https://github.com/devlooped/GitInfo/issues/39) +- packed-refs need be tracked. [\#37](https://github.com/devlooped/GitInfo/issues/37) +- ThisAssembly.Git.Commit: Information Mis-match [\#33](https://github.com/devlooped/GitInfo/issues/33) +- VB.Net: Strict Mode [\#32](https://github.com/devlooped/GitInfo/issues/32) +- Using GitSemVer in TFS builds/releases. [\#29](https://github.com/devlooped/GitInfo/issues/29) +- Branch names with slashes are chopped [\#27](https://github.com/devlooped/GitInfo/issues/27) +- Set default value for GitIsDirty [\#23](https://github.com/devlooped/GitInfo/issues/23) +- Confused about where values come from [\#21](https://github.com/devlooped/GitInfo/issues/21) +- override ThisAssemblyNamespace [\#20](https://github.com/devlooped/GitInfo/issues/20) +- Build error with 1.1.32 [\#17](https://github.com/devlooped/GitInfo/issues/17) +- Usefulness of Git.SemVer.Patch compared to Git.Commits? [\#9](https://github.com/devlooped/GitInfo/issues/9) +- Cant get it to work on Universal Windows Platform [\#7](https://github.com/devlooped/GitInfo/issues/7) +- Tag prefix per project possible ? [\#5](https://github.com/devlooped/GitInfo/issues/5) +- Still -Pre release on nuget? [\#1](https://github.com/devlooped/GitInfo/issues/1) + +:twisted_rightwards_arrows: Merged: + +- Allow tag and base version customization, flex matching [\#129](https://github.com/devlooped/GitInfo/pull/129) (@kzu) +- Prevent tag refs in $\(GitBranch\) for detached heads. [\#127](https://github.com/devlooped/GitInfo/pull/127) (@andersforsgren) +- Add GitCommitsIgnoreMerges option [\#125](https://github.com/devlooped/GitInfo/pull/125) (@christianerbsmehl) +- Remove username and password from repository URL [\#123](https://github.com/devlooped/GitInfo/pull/123) (@sbj42) +- Add GitCommitDate \(\#65\) [\#121](https://github.com/devlooped/GitInfo/pull/121) (@nikolamilekic) +- Use verbatim string literals in C\# and F\# templates [\#120](https://github.com/devlooped/GitInfo/pull/120) (@sbj42) +- Fix GitSemVerPatch always 0 [\#117](https://github.com/devlooped/GitInfo/pull/117) (@ysc3839) +- Make the PATCH / GitBaseVersionPatch optional [\#115](https://github.com/devlooped/GitInfo/pull/115) (@BoBiene) +- Fix GitThisAssemblyMetadata [\#112](https://github.com/devlooped/GitInfo/pull/112) (@joacar) +- Add repository url [\#111](https://github.com/devlooped/GitInfo/pull/111) (@joacar) +- fixed \#98 [\#110](https://github.com/devlooped/GitInfo/pull/110) (@pedoc) +- Turn off signature display when running log [\#102](https://github.com/devlooped/GitInfo/pull/102) (@kzu) +- Fix SemVer.Source not working in Visual Basic [\#97](https://github.com/devlooped/GitInfo/pull/97) (@MobileManiC) +- F\# support [\#93](https://github.com/devlooped/GitInfo/pull/93) (@ndani14) +- Don't cause MSBuild warnings 'expected' failures [\#90](https://github.com/devlooped/GitInfo/pull/90) (@alanmcgovern) +- Fix incremental build [\#82](https://github.com/devlooped/GitInfo/pull/82) (@shadow-cs) +- Reintroduce NormalizeDirectory usage, fix actual error [\#75](https://github.com/devlooped/GitInfo/pull/75) (@kzu) +- Ensure we normalize to the correct path separator [\#73](https://github.com/devlooped/GitInfo/pull/73) (@alanmcgovern) +- Allow counting all commits in the repository [\#66](https://github.com/devlooped/GitInfo/pull/66) (@alanmcgovern) +- Ensuring the GitExe is set when the initial target is not evaluated [\#58](https://github.com/devlooped/GitInfo/pull/58) (@adalon) +- Fix for cygwin/WSL and add support for Windows Store WSL distros [\#57](https://github.com/devlooped/GitInfo/pull/57) (@chkn) +- Add support for multi-targeting builds to retrieve Git information [\#53](https://github.com/devlooped/GitInfo/pull/53) (@kzu) +- v2 [\#52](https://github.com/devlooped/GitInfo/pull/52) (@kzu) +- Switch to 2017 image [\#51](https://github.com/devlooped/GitInfo/pull/51) (@kzu) +- Use MSBuildRuntimeTime to discern xbuild [\#50](https://github.com/devlooped/GitInfo/pull/50) (@abock) +- Don't do xbuild things on Windows [\#42](https://github.com/devlooped/GitInfo/pull/42) (@bojanrajkovic) +- Add \ comments to templates [\#40](https://github.com/devlooped/GitInfo/pull/40) (@bvli) +- track packed-refs as refs/heads may be empty when "packed-refs -all" have been used [\#38](https://github.com/devlooped/GitInfo/pull/38) (@bigbearzhu) +- VB.Net: Strict Mode, fixes \#32 [\#36](https://github.com/devlooped/GitInfo/pull/36) (@wahmedswl) +- fixes \#32 [\#35](https://github.com/devlooped/GitInfo/pull/35) (@wahmedswl) +- Add support for git in WSL [\#31](https://github.com/devlooped/GitInfo/pull/31) (@chkn) +- Update documentation \(and whitespace\) [\#26](https://github.com/devlooped/GitInfo/pull/26) (@dueringa) +- Set default value for GitIsDirty in non-repos [\#25](https://github.com/devlooped/GitInfo/pull/25) (@dueringa) +- Set default value for GitIsDirty in non-repos [\#24](https://github.com/devlooped/GitInfo/pull/24) (@dueringa) +- Added support for worktrees [\#22](https://github.com/devlooped/GitInfo/pull/22) (@taylorjonl) +- Update GitInputs list to include branch heads recursively [\#19](https://github.com/devlooped/GitInfo/pull/19) (@bigbearzhu) +- add missing close paren breaking markdown link [\#11](https://github.com/devlooped/GitInfo/pull/11) (@jamesmanning) +- Fix cygwin support [\#4](https://github.com/devlooped/GitInfo/pull/4) (@chkn) +- Untabification of readme.txt [\#3](https://github.com/devlooped/GitInfo/pull/3) (@atifaziz) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/index.html b/index.html new file mode 100644 index 0000000..17bfbc6 --- /dev/null +++ b/index.html @@ -0,0 +1,378 @@ + + + + + + + + + + +GitInfo | Git and SemVer Info from MSBuild, C# and VB + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + View on GitHub + + +

GitInfo

+

Git and SemVer Info from MSBuild, C# and VB

+ + +
+
+ + +
+
+

Icon GitInfo

+ +

Git Info from MSBuild, C# and VB

+ +
+

A fresh and transparent approach to Git information retrieval from MSBuild and Code without +using any custom tasks or compiled code and tools, obscure settings, format strings, etc.

+
+ +

Latest version +Downloads +License +Build

+ +

Install via NuGet:

+ +
PM> Install-Package GitInfo
+
+ + +

This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). +For IDE usage, sponsor status is required. IDE-only warnings will be issued after a grace period otherwise.

+ + + +

Usage

+ +

By default, if the containing project is a C#, F# or VB project, a compile-time generated +source file will contain all the git information and can be accessed from anywhere within +the assembly, as constants in a ThisAssembly (partial) class and its nested Git static class:

+ +
Console.WriteLine(ThisAssembly.Git.Commit);
+
+ +
+

NOTE: you may need to close and reopen the solution in order +for Visual Studio to refresh intellisense and show the +ThisAssembly type the first time after installing the package.

+
+ +

By default, GitInfo will also set $(Version) and $(PackageVersion) which the .NET +SDK uses for deriving the AssemblyInfo, FileVersion and InformationalVersion values, +as well as for packing. This default version is formatted from the following populated +MSBuild properties: $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit).

+ +

So, straight after install and build/pack, you will get some versioning in place :).

+ +

Alternatively, you can opt-out of this default versioning by setting GitVersion=false +in your project file, if you want to just leverage the Git information and/or version +properties/constants yourself:

+ +
<PropertyGroup>
+  <GitVersion>false</GitVersion>
+</PropertyGroup>
+
+ +

This allows you to use the provided constants to build any versioning attributes you want, +with whatever information you want, without resorting to settings, format strings or anything, +just plain code:

+ +

C#:

+
[assembly: AssemblyVersion(ThisAssembly.Git.BaseVersion.Major + "." + ThisAssembly.Git.BaseVersion.Minor + "." + ThisAssembly.Git.BaseVersion.Patch)]
+
+[assembly: AssemblyFileVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)]
+
+[assembly: AssemblyInformationalVersion(
+    ThisAssembly.Git.SemVer.Major + "." +
+    ThisAssembly.Git.SemVer.Minor + "." +
+    ThisAssembly.Git.Commits + "-" +
+    ThisAssembly.Git.Branch + "+" +
+    ThisAssembly.Git.Commit)]
+
+ +

F#:

+
module AssemblyInfo
+
+open System.Reflection
+
+[<assembly: AssemblyVersion(ThisAssembly.Git.BaseVersion.Major + "." + ThisAssembly.Git.BaseVersion.Minor + "." + ThisAssembly.Git.BaseVersion.Patch)>]
+
+[<assembly: AssemblyFileVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)>]
+
+[<assembly: AssemblyInformationalVersion(
+    ThisAssembly.Git.SemVer.Major + "." +
+    ThisAssembly.Git.SemVer.Minor + "." +
+    ThisAssembly.Git.Commits + "-" +
+    ThisAssembly.Git.Branch + "+" +
+    ThisAssembly.Git.Commit)>]
+
+do ()
+
+ +

VB:

+
<Assembly: AssemblyVersion(ThisAssembly.Git.BaseVersion.Major + "." + ThisAssembly.Git.BaseVersion.Minor + "." + ThisAssembly.Git.BaseVersion.Patch)>
+
+<Assembly: AssemblyFileVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)>
+
+<Assembly: AssemblyInformationalVersion(
+    ThisAssembly.Git.SemVer.Major + "." +
+    ThisAssembly.Git.SemVer.Minor + "." +
+    ThisAssembly.Git.Commits + "-" +
+    ThisAssembly.Git.Branch + "+" +
+    ThisAssembly.Git.Commit)>
+
+ +
+

NOTE: when generating your own assembly version attributes, you will need to turn off +the corresponding assembly version attribute generation from the .NET SDK, by setting +the relevant properties to false: GenerateAssemblyVersionAttribute, +GenerateAssemblyFileVersionAttribute and GenerateAssemblyInformationalVersionAttribute.

+
+ +

You can also just build your own versioning logic in a target that depends on GitInfo using plain MSBuild:

+ +
<PropertyGroup>
+  <GitVersion>false</GitVersion> <!-- we'll do our own versioning -->
+</PropertyGroup>
+
+<ItemGroup>
+  <PackageReference Include="GitInfo" PrivateAssets="all" />
+</ItemGroup>
+
+<Target Name="PopulateInfo" DependsOnTargets="GitVersion" BeforeTargets="GetAssemblyVersion;GenerateNuspec;GetPackageContents">
+  <PropertyGroup>
+    <Version>$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit)</Version>
+    <PackageVersion>$(Version)</PackageVersion>
+    <RepositoryBranch>$(GitBranch)</RepositoryBranch>
+    <RepositoryCommit>$(GitCommit)</RepositoryCommit>
+    <SourceRevisionId>$(GitBranch) $(GitCommit)</SourceRevisionId>
+  </PropertyGroup>
+</Target>
+
+ +
+

NOTE: because the provided properties are populated via targets that need to run +before they are available, you cannot use the GitInfo-provided properties in a +PropertyGroup at the project level. You can only use them from within a target that +in turn depends on the relevant target from GitInfo (typically, GitVersion as +shown above, if you consume the SemVer properties).

+
+ +

Because this information is readily available whenever you build the project, you +never depend on CI build scripts that generate versions for you, and you can +always compile locally exactly the same version of an assembly that was built by +a CI server.

+ +

You can read more about this project at the +GitInfo announcement blog post.

+ +

Details

+ +

Exposes the following information for use directly from any MSBuild +target that depends on the GitInfo target:

+ +
  $(GitRepositoryUrl)
+  $(GitBranch)
+  $(GitCommit)
+  $(GitCommitDate)
+  $(GitCommits)
+  $(GitTag)
+  $(GitBaseTag)
+  $(GitBaseVersionMajor)
+  $(GitBaseVersionMinor)
+  $(GitBaseVersionPatch)
+  $(GitSemVerMajor)
+  $(GitSemVerMinor)
+  $(GitSemVerPatch)
+  $(GitSemVerLabel)
+  $(GitSemVerDashLabel)
+  $(GitSemVerSource)
+  $(GitIsDirty)
+
+ +

For C#, F# and VB, constants are generated too so that the same information can be +accessed from code:

+ +
  ThisAssembly.Git.RepositoryUrl
+  ThisAssembly.Git.Branch
+  ThisAssembly.Git.Commit
+  ThisAssembly.Git.Commits
+  ThisAssembly.Git.Tag
+  ThisAssembly.Git.BaseTag
+  ThisAssembly.Git.BaseVersion.Major
+  ThisAssembly.Git.BaseVersion.Minor
+  ThisAssembly.Git.BaseVersion.Patch
+  ThisAssembly.Git.SemVer.Major
+  ThisAssembly.Git.SemVer.Minor
+  ThisAssembly.Git.SemVer.Patch
+  ThisAssembly.Git.SemVer.Label
+  ThisAssembly.Git.SemVer.DashLabel
+  ThisAssembly.Git.SemVer.Source
+  ThisAssembly.Git.IsDirty
+
+ +

Available MSBuild properties +to customize the behavior:

+ +
  $(GitVersion): set to 'false' to avoid setting Version and PackageVersion to a default version with format:
+                 $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit)
+
+  $(GitThisAssembly): set to 'false' to prevent assembly metadata and constants generation.
+
+  $(GitThisAssemblyMetadata): set to 'false' to prevent assembly metadata generation only. Defaults to 'false'.
+                              If 'true', it will also provide assembly metadata attributes for each of the populated values.
+
+  $(ThisAssemblyNamespace): allows overriding the namespace for the ThisAssembly class. Defaults to the global namespace.
+
+  $(GitRemote): name of remote to get repository url for. Defaults to 'origin'.
+
+  $(GitBranchCI): determines whether the branch name should be populated from default environment variables used by the CI system. Default to 'true'.
+
+  $(GitDefaultBranch): determines the base branch used to calculate commits on top of current branch. Defaults to 'main'.
+
+  $(GitVersionFile): determines the name of a file in the Git repository root used to provide the base version info. Defaults to 'GitInfo.txt'.
+
+  $(GitCommitsRelativeTo): optionally specifies an alternative directory for counting commits on top of the base version. Defaults to the $(GitVersionFile) directory.
+
+  $(GitCommitsIgnoreMerges): set to 'true' to ignore merge commits when calculating the number of commits. Defaults to 'false'.
+
+  $(GitInfoReportImportance): allows rendering all the retrieved git information with the specified message importance ('high', 'normal' or 'low'). Defaults to 'low'.
+
+  $(GitIgnoreBranchVersion) and $(GitIgnoreTagVersion): determines whether the branch and tags (if any) will be used to find a base version. Defaults to empty value (no ignoring).
+
+  $(GitNameRevOptions): options passed to git name-rev when finding a branch name for a commit (Detached head). The default is '--refs=refs/heads/* --no-undefined --always'
+                        meaning branch names only, falling back to commit hash. For the legacy behavior where $(GitBranch) for detached head can also be a tag name, use '--refs=refs/*'.
+                        Refs can be included and excluded, see git name-rev docs.
+
+  $(GitSkipCache): whether to cache the Git information determined in a previous build in a GitInfo.cache for performance reasons. Defaults to empty value (no ignoring).
+
+  $(GitCachePath): where to cache the determined Git information. Gives the chance to use a shared location for different projects. This can improve the overall build time.
+                   Has to end with a path seperator Defaults to empty value ('$(IntermediateOutputPath)').
+
+  $(GitTagRegex): regular expression used with git describe to filter the tags to consider for base version lookup. Defaults to * (all).
+
+  $(GitBaseVersionRegex): regular expression used to match and validate valid base versions in branch, tag or file sources. By default, matches any string that *ends* in a valid SemVer2 string.
+                          Defaults to 'v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)(?:\-(?<LABEL>[\dA-Za-z\-\.]+))?$|^(?<LABEL>[\dA-Za-z\-\.]+)\-v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)$'
+
+  $(GitCommitDateFormat): value passed as the format option when trying to retrieve the git commit date. Defaults to %%cI (windows) or %cI (non windows).
+
+ +

Goals

+ +
    +
  • No compiled code or tools -> 100% transparency
  • +
  • Trivially added/installed via a NuGet package
  • +
  • No format strings or settings to learn
  • +
  • Simple well-structured .targets file +with plain MSBuild and no custom tasks
  • +
  • Optional embedding +of Git info in assembly metadata
  • +
  • Optional use of Git info to build arbitrary assembly/file version information, both +in C# as well +as VB.
  • +
  • Trivially modified/improved generated code by just adjusting a +C# or +F# or +VB template +included in the NuGet package
  • +
  • 100% incremental build-friendly and high-performing (all proper Inputs/Outputs in place, smart caching of Git info, etc.)
  • +
+ + + +

Sponsors

+ + +

Clarius Org +MFB Technologies, Inc. +Torutek +DRIVE.NET, Inc. +Keith Pickford +Thomas Bolon +Kori Francis +Toni Wenzel +Uno Platform +Dan Siegel +Reuben Swartz +Jacob Foshee + +Ix Technologies B.V. +David JENNI +Jonathan +Charley Wu +Jakob Tikjøb Andersen +Tino Hager +Ken Bonny +Simon Cropp +agileworks-eu +sorahex +Zheyu Shen +Vezel +ChilliCream +4OTC +Vincent Limo +Jordan S. Jones +domischell +Joseph Kingry

+ + + +

Sponsor this project

+ +

Learn more about GitHub Sponsors

+ + + +
+
+ + + + + diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..83969dc --- /dev/null +++ b/license.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) Daniel Cazzulino and Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..c67d196 --- /dev/null +++ b/readme.md @@ -0,0 +1,309 @@ +![Icon](https://raw.githubusercontent.com/devlooped/GitInfo/main/assets/images/git.png) GitInfo +============ + +Git Info from MSBuild, C# and VB + +> A fresh and transparent approach to Git information retrieval from MSBuild and Code without +> using any custom tasks or compiled code and tools, obscure settings, format strings, etc. + +[![Latest version](https://img.shields.io/nuget/v/GitInfo.svg)](https://www.nuget.org/packages/GitInfo) +[![Downloads](https://img.shields.io/nuget/dt/GitInfo.svg)](https://www.nuget.org/packages/GitInfo) +[![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php) +[![Build](https://github.com/devlooped/GitInfo/actions/workflows/build.yml/badge.svg)](https://github.com/devlooped/GitInfo/actions/workflows/build.yml) + +Install via [NuGet](https://www.nuget.org/packages/GitInfo): + +```pwsh +PM> Install-Package GitInfo +``` + + +*This project uses [SponsorLink](https://github.com/devlooped#sponsorlink) to attribute sponsor status (direct, indirect or implicit).* +*For IDE usage, sponsor status is required. IDE-only warnings will be issued after a grace period otherwise.* + + + +## Usage + +By default, if the containing project is a C#, F# or VB project, a compile-time generated +source file will contain all the git information and can be accessed from anywhere within +the assembly, as constants in a `ThisAssembly` (partial) class and its nested `Git` static class: + +```csharp +Console.WriteLine(ThisAssembly.Git.Commit); +``` + +> NOTE: you may need to close and reopen the solution in order +> for Visual Studio to refresh intellisense and show the +> ThisAssembly type the first time after installing the package. + +By default, GitInfo will also set `$(Version)` and `$(PackageVersion)` which the .NET +SDK uses for deriving the AssemblyInfo, FileVersion and InformationalVersion values, +as well as for packing. This default version is formatted from the following populated +MSBuild properties: `$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit)`. + +So, straight after install and build/pack, you will get some versioning in place :). + +Alternatively, you can opt-out of this default versioning by setting `GitVersion=false` +in your project file, if you want to just leverage the Git information and/or version +properties/constants yourself: + +```xml + + false + +``` + +This allows you to use the provided constants to build any versioning attributes you want, +with whatever information you want, without resorting to settings, format strings or anything, +just plain code: + +C#: +```csharp +[assembly: AssemblyVersion(ThisAssembly.Git.BaseVersion.Major + "." + ThisAssembly.Git.BaseVersion.Minor + "." + ThisAssembly.Git.BaseVersion.Patch)] + +[assembly: AssemblyFileVersion(ThisAssembly.Git.SemVer.Major + "." + ThisAssembly.Git.SemVer.Minor + "." + ThisAssembly.Git.SemVer.Patch)] + +[assembly: AssemblyInformationalVersion( + ThisAssembly.Git.SemVer.Major + "." + + ThisAssembly.Git.SemVer.Minor + "." + + ThisAssembly.Git.Commits + "-" + + ThisAssembly.Git.Branch + "+" + + ThisAssembly.Git.Commit)] +``` + +F#: +```fsharp +module AssemblyInfo + +open System.Reflection + +[] + +[] + +[] + +do () +``` + +VB: +```vbnet + + + + + +``` + +> NOTE: when generating your own assembly version attributes, you will need to turn off +> the corresponding assembly version attribute generation from the .NET SDK, by setting +> the relevant properties to false: `GenerateAssemblyVersionAttribute`, +> `GenerateAssemblyFileVersionAttribute` and `GenerateAssemblyInformationalVersionAttribute`. + +You can also just build your own versioning logic in a target that depends on GitInfo using plain MSBuild: + +```xml + + false + + + + + + + + + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit) + $(Version) + $(GitBranch) + $(GitCommit) + $(GitBranch) $(GitCommit) + + +``` + +> NOTE: because the provided properties are populated via targets that need to run +> before they are available, you cannot use the GitInfo-provided properties in a +> PropertyGroup at the project level. You can only use them from within a target that +> in turn depends on the relevant target from GitInfo (typically, `GitVersion` as +> shown above, if you consume the SemVer properties). + +Because this information is readily available whenever you build the project, you +never depend on CI build scripts that generate versions for you, and you can +always compile locally exactly the same version of an assembly that was built by +a CI server. + +You can read more about this project at the +[GitInfo announcement blog post](http://www.cazzulino.com/git-info-from-msbuild-and-code.html). + +## Details + +Exposes the following information for use directly from any MSBuild +target that depends on the GitInfo target: + +``` + $(GitRepositoryUrl) + $(GitBranch) + $(GitCommit) + $(GitCommitDate) + $(GitCommits) + $(GitTag) + $(GitBaseTag) + $(GitBaseVersionMajor) + $(GitBaseVersionMinor) + $(GitBaseVersionPatch) + $(GitSemVerMajor) + $(GitSemVerMinor) + $(GitSemVerPatch) + $(GitSemVerLabel) + $(GitSemVerDashLabel) + $(GitSemVerSource) + $(GitIsDirty) +``` + +For C#, F# and VB, constants are generated too so that the same information can be +accessed from code: + +``` + ThisAssembly.Git.RepositoryUrl + ThisAssembly.Git.Branch + ThisAssembly.Git.Commit + ThisAssembly.Git.Commits + ThisAssembly.Git.Tag + ThisAssembly.Git.BaseTag + ThisAssembly.Git.BaseVersion.Major + ThisAssembly.Git.BaseVersion.Minor + ThisAssembly.Git.BaseVersion.Patch + ThisAssembly.Git.SemVer.Major + ThisAssembly.Git.SemVer.Minor + ThisAssembly.Git.SemVer.Patch + ThisAssembly.Git.SemVer.Label + ThisAssembly.Git.SemVer.DashLabel + ThisAssembly.Git.SemVer.Source + ThisAssembly.Git.IsDirty +``` + +Available [MSBuild properties](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-properties) +to customize the behavior: + +``` + $(GitVersion): set to 'false' to avoid setting Version and PackageVersion to a default version with format: + $(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit) + + $(GitThisAssembly): set to 'false' to prevent assembly metadata and constants generation. + + $(GitThisAssemblyMetadata): set to 'false' to prevent assembly metadata generation only. Defaults to 'false'. + If 'true', it will also provide assembly metadata attributes for each of the populated values. + + $(ThisAssemblyNamespace): allows overriding the namespace for the ThisAssembly class. Defaults to the global namespace. + + $(GitRemote): name of remote to get repository url for. Defaults to 'origin'. + + $(GitBranchCI): determines whether the branch name should be populated from default environment variables used by the CI system. Default to 'true'. + + $(GitDefaultBranch): determines the base branch used to calculate commits on top of current branch. Defaults to 'main'. + + $(GitVersionFile): determines the name of a file in the Git repository root used to provide the base version info. Defaults to 'GitInfo.txt'. + + $(GitCommitsRelativeTo): optionally specifies an alternative directory for counting commits on top of the base version. Defaults to the $(GitVersionFile) directory. + + $(GitCommitsIgnoreMerges): set to 'true' to ignore merge commits when calculating the number of commits. Defaults to 'false'. + + $(GitInfoReportImportance): allows rendering all the retrieved git information with the specified message importance ('high', 'normal' or 'low'). Defaults to 'low'. + + $(GitIgnoreBranchVersion) and $(GitIgnoreTagVersion): determines whether the branch and tags (if any) will be used to find a base version. Defaults to empty value (no ignoring). + + $(GitNameRevOptions): options passed to git name-rev when finding a branch name for a commit (Detached head). The default is '--refs=refs/heads/* --no-undefined --always' + meaning branch names only, falling back to commit hash. For the legacy behavior where $(GitBranch) for detached head can also be a tag name, use '--refs=refs/*'. + Refs can be included and excluded, see git name-rev docs. + + $(GitSkipCache): whether to cache the Git information determined in a previous build in a GitInfo.cache for performance reasons. Defaults to empty value (no ignoring). + + $(GitCachePath): where to cache the determined Git information. Gives the chance to use a shared location for different projects. This can improve the overall build time. + Has to end with a path seperator Defaults to empty value ('$(IntermediateOutputPath)'). + + $(GitTagRegex): regular expression used with git describe to filter the tags to consider for base version lookup. Defaults to * (all). + + $(GitBaseVersionRegex): regular expression used to match and validate valid base versions in branch, tag or file sources. By default, matches any string that *ends* in a valid SemVer2 string. + Defaults to 'v?(?\d+)\.(?\d+)\.(?\d+)(?:\-(?