All Projects → 304NotModified → Fody.stamp

304NotModified / Fody.stamp

Licence: mit
Stamps an assembly with git data

Projects that are alternatives of or similar to Fody.stamp

Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (+716.92%)
Mutual labels:  versioning
Lift
Simple Android Application update logic component
Stars: ✭ 10 (-84.62%)
Mutual labels:  versioning
Grabver
Gradle Automatic Build Versioning Plugin - An easy Gradle plugin that follows semver.org rules to automatically generate the Patch version, Build number and Code version, while Major, Minor and Pre-Release suffix remain under our control.
Stars: ✭ 39 (-40%)
Mutual labels:  versioning
Gradle Advanced Build Version
A plugin to generate the Android version code and version name automatically based on git commits number, date and ...
Stars: ✭ 545 (+738.46%)
Mutual labels:  versioning
Niv
Easy dependency management for Nix projects
Stars: ✭ 669 (+929.23%)
Mutual labels:  versioning
Strangelog
Painless file-based changelog management via CLI.
Stars: ✭ 12 (-81.54%)
Mutual labels:  versioning
Version
Laravel App versioning
Stars: ✭ 498 (+666.15%)
Mutual labels:  versioning
Logidze
Database changes log for Rails
Stars: ✭ 1,060 (+1530.77%)
Mutual labels:  versioning
Refreshversions
Life is too short to google for dependencies and versions
Stars: ✭ 841 (+1193.85%)
Mutual labels:  versioning
Fastlane Plugin Flutter version
Fastlane plugin to retrieve version code for Flutter projects.
Stars: ✭ 31 (-52.31%)
Mutual labels:  versioning
Versioncake
🍰 Version Cake is an unobtrusive way to version APIs in your Rails or Rack apps
Stars: ✭ 623 (+858.46%)
Mutual labels:  versioning
Shipjs
Take control of what is going to be your next release.
Stars: ✭ 668 (+927.69%)
Mutual labels:  versioning
Gitversioningonxcode
Pretty Xcode Git versioning for iOS & macOS applications
Stars: ✭ 15 (-76.92%)
Mutual labels:  versioning
Standard Version
🏆 Automate versioning and CHANGELOG generation, with semver.org and conventionalcommits.org
Stars: ✭ 5,806 (+8832.31%)
Mutual labels:  versioning
Kedro Mlflow
A kedro-plugin for integration of mlflow capabilities inside kedro projects (especially machine learning model versioning and packaging)
Stars: ✭ 48 (-26.15%)
Mutual labels:  versioning
Keep A Changelog
If you build software, keep a changelog.
Stars: ✭ 5,065 (+7692.31%)
Mutual labels:  versioning
Versioning Spring Boot Starter
Spring boot starter using for versioning rest easily.
Stars: ✭ 11 (-83.08%)
Mutual labels:  versioning
Stability Badges
SVG badges for Go projects
Stars: ✭ 51 (-21.54%)
Mutual labels:  versioning
Python Aos Lesson
Python for Atmosphere and Ocean Scientists
Stars: ✭ 49 (-24.62%)
Mutual labels:  versioning
React Native Npm Version
Example of React-Native application with version from package.json and npm version bump.
Stars: ✭ 20 (-69.23%)
Mutual labels:  versioning

NuGet Status Build status

Icon

This is an add-in for Fody

Stamps an assembly with git data.

The nuget package

https://nuget.org/packages/Stamp.Fody/

PM> Install-Package Stamp.Fody

Add to FodyWeavers.xml

Add <Stamp/> to FodyWeavers.xml

<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
  <Stamp />
</Weavers>

What it does

Extracts the git information from disk, combines it with the assembly version, and places it in the AssemblyInformationalVersionAttribute.

So if your assembly version is 1.0.0.0, the working branch is master and the last commit is 759e9ddb53271dfa9335a3b27e452749a9b22280 then the following attribute will be added to the assembly.

[assembly: AssemblyInformationalVersion("1.0.0.0 Head:'master' Sha:759e9ddb53271dfa9335a3b27e452749a9b22280")]

Templating the version

You can customize the string used in the AssemblyInformationalVersionAttribute by adding some tokens to the string, which Stamp will replace.

For example, if you add [assembly: AssemblyInformationalVersion("%version% Branch=%branch%")] then Stamp will change it to [assembly: AssemblyInformationalVersion("1.0.0.0 Branch=master")]

The tokens are:

  • %version% is replaced with the version (1.0.0.0)
  • %version1% is replaced with the major version only (1)
  • %version2% is replaced with the major and minor version (1.0)
  • %version3% is replaced with the major, minor, and revision version (1.0.0)
  • %version4% is replaced with the major, minor, revision, and build version (1.0.0.0)
  • %now% is replaced with the current short date
  • %utcnow% is replaced with the current utc short date
  • %githash% is replaced with the SHA1 hash of the branch tip of the repository
  • %shorthash% is replaced with the first eight characters of %githash%
  • %branch% is replaced with the branch name of the repository
  • %haschanges% is replaced with the string defined in the ChangeString attribute in the configuration, see below.
  • %user% is replaced with the current user name
  • %machinename% is replaced with the current machine name
  • %lasttag% -is replaced with the last git tag in this branch.

NOTE: if you already have an AssemblyInformationalVersion attribute and it doesn't use replacement tokens, it will not be modified at all.

Configuration

All config options are attributes of <Stamp /> element in FodyWeavers.xml

ChangeString

Define the string used to indicate that the code was built from a non clean repository.

Default is HasChanges

<Stamp ChangeString="New text" />

UseProjectGit

Define if you want to start Stamp to start searching for the Git repository in the ProjectDir (true) or the SolutionDir (false).

Default is false (SolutionDir)

<Stamp UseProjectGit='true' />

Icon

Stamp designed by Rohith M S from The Noun Project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].