gajus / gajus/gitinfo

GitInfo does not work when the project does not compile any source file

Open
#17 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
46
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Assume no compilation is involved in a project, this is the case for example in .nuproj projets.
When the project references the GitInfo nuget package, the targets (`GitInfo`, `GetVersion`, etc.) are not executed. However, it would be nice to also access git information properties in .nuproj files that only contain metadata such as targets files and do not produce any assembly.

Git information retrieval currently only occurs only when compilation occurs, as
shown in the lines below extracted from `GitInfo.targets`
```

GitInfo;
GitVersion;
GitThisAssembly;
GitInfoReport;
$(CoreCompileDependsOn)

```

The property above could be changed into something like `CoreBuildDependsOn`.

Or is there any specific reason for using `CoreCompileDependsOn`?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in GitInfo.targets and trace the GitInfo, GitVersion, GitThisAssembly, and GitInfoReport targets under CoreCompileDependsOn. Verify behavior with a .nuproj project that has no source compilation; done means the Git information properties are available there as well.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.