Skip to content

Commit de2aa8d

Browse files
committed
Adopt OSMF EULA
Related #385
1 parent 82479be commit de2aa8d

File tree

8 files changed

+138
-212
lines changed

8 files changed

+138
-212
lines changed

.netconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,8 @@
150150
sha = 77e83f238196d2723640abef0c7b6f43994f9747
151151
etag = fcb9759a96966df40dcd24906fd328ddec05953b7e747a6bb8d0d1e4c3865274
152152
weak
153+
[file "osmfeula.txt"]
154+
url = https://github.com/devlooped/.github/blob/main/osmfeula.txt
155+
sha = 666a2a7c315f72199c418f11482a950fc69a8901
156+
etag = 91ea15c07bfd784036c6ca931f5b2df7e9767b8367146d96c79caef09d63899f
157+
weak

osmfeula.txt

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
End User License Agreement
2+
3+
This Open Source Maintenance Fee Agreement ("Agreement") is a legal agreement
4+
between you ("User") and Devlooped ("Project") for the use of
5+
$product$ ("Software"), an open source software project licensed under
6+
the MIT License ("OSI License"), an OSI-approved open source license.
7+
Project offers a Binary Release of the Software to Users in exchange for a
8+
maintenance fee ("Fee"). "Binary Release" refers to pre-compiled executable
9+
versions of the Software provided by Project. By accessing or using the
10+
Binary Release, User agrees to be bound by the terms of this Agreement.
11+
12+
1. Applicability
13+
14+
Project agrees to provide User with the Binary Release in exchange for the
15+
Fees outlined in Section 2, subject to the terms of this Agreement. The Fee
16+
applies only to Users that generate revenue by the Software.
17+
Non-revenue-generating use of the Software is exempt from this Fee. In
18+
addition, Users who pay separate support and/or maintenance fees to the
19+
maintainers of the Software are exempt from the Fee outlined in this
20+
Agreement. This distinction ensures that duplicate fees are not imposed,
21+
promoting fairness and consistency while respecting alternative support
22+
arrangements.
23+
24+
2. Monthly Fee and Payment Terms
25+
26+
Revenue-generating Users required to pay the Fee shall follow the payment
27+
terms set forth by the Project. Failure to comply with these terms may result
28+
in suspending access to the Binary Release. However, this does not restrict
29+
the User from obtaining or redistributing binaries from other sources or
30+
self-compiling them.
31+
32+
3. Nature of the Fee
33+
34+
The Fee is not a license fee. The Software's source code is licensed to User
35+
under the OSI License and remains freely distributable under the terms of the
36+
OSI License and any applicable open-source licenses.
37+
38+
4. Conflicts with OSI License
39+
40+
To the extent any term of this Agreement conflicts with User's rights
41+
under the OSI License regarding the Software, the OSI License shall govern.
42+
This Agreement applies only to the Binary Release and does not limit User's
43+
ability to access, modify, or distribute the Software's source code or
44+
self-compiled binaries. User may independently compile binaries from the
45+
Software's source code without this Agreement, subject to OSI License terms.
46+
User may redistribute the Binary Release received under this Agreement,
47+
provided such redistribution complies with the OSI License (e.g., including
48+
copyright and permission notices). This Agreement imposes no additional
49+
restrictions on such rights.
50+
51+
5. Disclaimer of Warranty and Limitation of Liability
52+
53+
THE SOFTWARE AND BINARY RELEASE ARE PROVIDED BY THE PROJECT "AS IS" AND ANY
54+
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
55+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
56+
DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR
57+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
58+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
59+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
60+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
61+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
62+
OF THE SOFTWARE AND BINARY RELEASE, EVEN IF ADVISED OF THE POSSIBILITY OF
63+
SUCH DAMAGE.

readme.md

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,25 @@
33

44
Git Info from MSBuild, C# and VB
55

6+
> [!NOTE]
67
> A fresh and transparent approach to Git information retrieval from MSBuild and Code without
78
> using any custom tasks or compiled code and tools, obscure settings, format strings, etc.
89
910
[![Latest version](https://img.shields.io/nuget/v/GitInfo.svg)](https://www.nuget.org/packages/GitInfo)
1011
[![Downloads](https://img.shields.io/nuget/dt/GitInfo.svg)](https://www.nuget.org/packages/GitInfo)
11-
[![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)
12-
[![Build](https://github.com/devlooped/GitInfo/actions/workflows/build.yml/badge.svg)](https://github.com/devlooped/GitInfo/actions/workflows/build.yml)
12+
[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black&color=C9FF30)](osmfeula.txt)
13+
[![OSS](https://img.shields.io/github/license/devlooped/oss.svg?color=blue)](license.txt)
1314

1415
Install via [NuGet](https://www.nuget.org/packages/GitInfo):
1516

1617
```pwsh
1718
PM> Install-Package GitInfo
1819
```
1920

20-
<!-- include https://github.com/devlooped/.github/raw/main/sponsorlinkr.md -->
21-
*This project uses [SponsorLink](https://github.com/devlooped#sponsorlink) to attribute sponsor status (direct, indirect or implicit).*
22-
*For IDE usage (without warnings), sponsor status is required. IDE-only warnings will be issued after a grace period otherwise.*
21+
<!-- include https://github.com/devlooped/.github/raw/main/osmf.md -->
2322

24-
<!-- https://github.com/devlooped/.github/raw/main/sponsorlinkr.md -->
25-
26-
## Usage
2723
<!-- #content -->
24+
## Usage
2825
By default, if the containing project is a C#, F# or VB project, a compile-time generated
2926
source file will contain all the git information and can be accessed from anywhere within
3027
the assembly, as constants in a `ThisAssembly` (partial) class and its nested `Git` static class:
@@ -194,74 +191,78 @@ accessed from code:
194191
ThisAssembly.Git.IsDirty
195192
```
196193

194+
## Goals
195+
196+
- No compiled code or tools -> 100% transparency
197+
- Trivially added/installed via [a NuGet package](https://www.nuget.org/packages/GitInfo)
198+
- No format strings or settings to learn
199+
- Simple well-structured [.targets file](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.targets)
200+
with plain MSBuild and no custom tasks
201+
- [Optional embedding](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.AssemblyMetadata.targets)
202+
of Git info in assembly metadata
203+
- Optional use of Git info to build arbitrary assembly/file version information, both
204+
[in C#](https://github.com/kzu/GitInfoDemo/blob/main/GitInfoDemo/Properties/AssemblyInfo.cs#L10) as well
205+
[as VB](https://github.com/kzu/GitInfoDemo/blob/main/GitInfoDemoVB/My%20Project/AssemblyInfo.vb#L8).
206+
- Trivially modified/improved generated code by just adjusting a
207+
[C#](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.cs.pp) or
208+
[F#](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.fs.pp) or
209+
[VB](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.vb.pp) template
210+
included in the [NuGet package](https://www.nuget.org/packages/GitInfo)
211+
- 100% incremental build-friendly and high-performing (all proper Inputs/Outputs in place, smart caching of Git info, etc.)
212+
213+
<!-- #content -->
214+
215+
## Customization
216+
197217
Available [MSBuild properties](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-properties)
198218
to customize the behavior:
199219

200220
```
201-
$(GitVersion): set to 'false' to avoid setting Version and PackageVersion to a default version with format:
202-
$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit)
221+
$(GitVersion): set to 'false' to avoid setting Version and PackageVersion to a default version with format:
222+
$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)$(GitSemVerDashLabel)+$(GitBranch).$(GitCommit)
203223
204-
$(GitThisAssembly): set to 'false' to prevent assembly metadata and constants generation.
224+
$(GitThisAssembly): set to 'false' to prevent assembly metadata and constants generation.
205225
206-
$(GitThisAssemblyMetadata): set to 'false' to prevent assembly metadata generation only. Defaults to 'false'.
207-
If 'true', it will also provide assembly metadata attributes for each of the populated values.
226+
$(GitThisAssemblyMetadata): set to 'false' to prevent assembly metadata generation only. Defaults to 'false'.
227+
If 'true', it will also provide assembly metadata attributes for each of the populated values.
208228
209-
$(ThisAssemblyNamespace): allows overriding the namespace for the ThisAssembly class. Defaults to the global namespace.
229+
$(ThisAssemblyNamespace): allows overriding the namespace for the ThisAssembly class. Defaults to the global namespace.
210230
211-
$(GitRemote): name of remote to get repository url for. Defaults to 'origin'.
231+
$(GitRemote): name of remote to get repository url for. Defaults to 'origin'.
212232
213-
$(GitBranchCI): determines whether the branch name should be populated from default environment variables used by the CI system. Default to 'true'.
233+
$(GitBranchCI): determines whether the branch name should be populated from default environment variables used by the CI system. Default to 'true'.
214234
215-
$(GitDefaultBranch): determines the base branch used to calculate commits on top of current branch. Defaults to 'main'.
235+
$(GitDefaultBranch): determines the base branch used to calculate commits on top of current branch. Defaults to 'main'.
216236
217-
$(GitVersionFile): determines the name of a file in the Git repository root used to provide the base version info. Defaults to 'GitInfo.txt'.
237+
$(GitVersionFile): determines the name of a file in the Git repository root used to provide the base version info. Defaults to 'GitInfo.txt'.
218238
219-
$(GitCommitsRelativeTo): optionally specifies an alternative directory for counting commits on top of the base version. Defaults to the $(GitVersionFile) directory.
239+
$(GitCommitsRelativeTo): optionally specifies an alternative directory for counting commits on top of the base version. Defaults to the $(GitVersionFile) directory.
220240
221-
$(GitCommitsIgnoreMerges): set to 'true' to ignore merge commits when calculating the number of commits. Defaults to 'false'.
241+
$(GitCommitsIgnoreMerges): set to 'true' to ignore merge commits when calculating the number of commits. Defaults to 'false'.
222242
223-
$(GitInfoReportImportance): allows rendering all the retrieved git information with the specified message importance ('high', 'normal' or 'low'). Defaults to 'low'.
243+
$(GitInfoReportImportance): allows rendering all the retrieved git information with the specified message importance ('high', 'normal' or 'low'). Defaults to 'low'.
224244
225-
$(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).
245+
$(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).
226246
227-
$(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'
228-
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/*'.
229-
Refs can be included and excluded, see git name-rev docs.
247+
$(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'
248+
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/*'.
249+
Refs can be included and excluded, see git name-rev docs.
230250
231-
$(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).
251+
$(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).
232252
233-
$(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.
234-
Has to end with a path seperator Defaults to empty value ('$(IntermediateOutputPath)').
253+
$(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.
254+
Has to end with a path seperator Defaults to empty value ('$(IntermediateOutputPath)').
235255
236-
$(GitTagRegex): regular expression used with git describe to filter the tags to consider for base version lookup. Defaults to * (all).
256+
$(GitTagRegex): regular expression used with git describe to filter the tags to consider for base version lookup. Defaults to * (all).
237257
238-
$(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.
239-
Defaults to 'v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)(?:\-(?<LABEL>[\dA-Za-z\-\.]+))?$|^(?<LABEL>[\dA-Za-z\-\.]+)\-v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)$'
258+
$(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.
259+
Defaults to 'v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)(?:\-(?<LABEL>[\dA-Za-z\-\.]+))?$|^(?<LABEL>[\dA-Za-z\-\.]+)\-v?(?<MAJOR>\d+)\.(?<MINOR>\d+)\.(?<PATCH>\d+)$'
240260
241-
$(GitCommitDateFormat): value passed as the format option when trying to retrieve the git commit date. Defaults to %%cI (windows) or %cI (non windows).
261+
$(GitCommitDateFormat): value passed as the format option when trying to retrieve the git commit date. Defaults to %%cI (windows) or %cI (non windows).
242262
```
243263

244-
## Goals
245-
246-
- No compiled code or tools -> 100% transparency
247-
- Trivially added/installed via [a NuGet package](https://www.nuget.org/packages/GitInfo)
248-
- No format strings or settings to learn
249-
- Simple well-structured [.targets file](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.targets)
250-
with plain MSBuild and no custom tasks
251-
- [Optional embedding](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.AssemblyMetadata.targets)
252-
of Git info in assembly metadata
253-
- Optional use of Git info to build arbitrary assembly/file version information, both
254-
[in C#](https://github.com/kzu/GitInfoDemo/blob/main/GitInfoDemo/Properties/AssemblyInfo.cs#L10) as well
255-
[as VB](https://github.com/kzu/GitInfoDemo/blob/main/GitInfoDemoVB/My%20Project/AssemblyInfo.vb#L8).
256-
- Trivially modified/improved generated code by just adjusting a
257-
[C#](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.cs.pp) or
258-
[F#](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.fs.pp) or
259-
[VB](https://github.com/kzu/GitInfo/blob/main/src/GitInfo/build/GitInfo.vb.pp) template
260-
included in the [NuGet package](https://www.nuget.org/packages/GitInfo)
261-
- 100% incremental build-friendly and high-performing (all proper Inputs/Outputs in place, smart caching of Git info, etc.)
262-
263-
<!-- #content -->
264264
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
265+
265266
# Sponsors
266267

267268
<!-- sponsors.md -->

src/Directory.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<PackageProjectUrl>https://clarius.org/GitInfo</PackageProjectUrl>
5+
<Product>GitInfo</Product>
56
</PropertyGroup>
67

78
</Project>

src/Directory.targets

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<Project InitialTargets="SetLocalVersion">
22

3-
<PropertyGroup>
4-
<Description>
5-
$(Description)
6-
7-
> This project uses SponsorLink to attribute sponsor status (direct, indirect or implicit). For IDE usage, sponsor status is required.
8-
> IDE-only warnings will be emitted after a grace period otherwise. Learn more at https://github.com/devlooped#sponsorlink.
9-
</Description>
10-
</PropertyGroup>
11-
123
<Target Name="SetLocalVersion" Condition="!$(CI)">
134
<GetVersion>
145
<Output TaskParameter="Version" PropertyName="Version" />

src/GitInfo/GitInfo.msbuildproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
<PackNone>true</PackNone>
99
<PackOnBuild>true</PackOnBuild>
1010
<PackageReadmeFile>readme.md</PackageReadmeFile>
11+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
12+
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
1113
</PropertyGroup>
1214
<ItemGroup>
13-
<PackageReference Include="NuGetizer" Version="1.2.3" />
15+
<PackageReference Include="NuGetizer" Version="1.4.5" />
1416
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
15-
<PackageReference Include="ThisAssembly.Constants" Version="2.0.6" Pack="true" TargetFramework="netstandard2.0" />
17+
<PackageReference Include="ThisAssembly.Constants" Version="2.1.2" Pack="true" TargetFramework="netstandard2.0" />
1618
</ItemGroup>
1719
<ItemGroup>
1820
<None Include="build/**/*.*" />
1921
<None Include="buildMultiTargeting/**/*.*" />
2022
<None Include="buildTransitive/**/*.*" />
23+
<None Include="..\..\osmfeula.txt" Link="osmfeula.txt" PackagePath="OSMFEULA.txt" />
2124
</ItemGroup>
2225
</Project>

src/GitInfo/readme.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
<!-- include https://github.com/devlooped/.github/raw/main/sponsorlinkr.md -->
1+
[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black&color=C9FF30)](osmfeula.txt)
2+
[![OSS](https://img.shields.io/github/license/devlooped/oss.svg?color=blue)](license.txt)
3+
[![GitHub](https://img.shields.io/badge/-source-181717.svg?logo=GitHub)](https://github.com/devlooped/GitInfo)
4+
5+
Git Info from MSBuild, C# and VB
6+
7+
> [!NOTE]
8+
> A fresh and transparent approach to Git information retrieval from MSBuild and Code without
9+
> using any custom tasks or compiled code and tools, obscure settings, format strings, etc.
10+
11+
<!-- include https://github.com/devlooped/.github/raw/main/osmf.md -->
212
<!-- include ../../readme.md#content -->
313
<!-- include https://github.com/devlooped/sponsors/raw/main/footer.md -->
414
<!-- prevent expansion via CI markdown includes -->

0 commit comments

Comments
 (0)