IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
43 stars 15 forks source link

Fix git revision reported by --version on nix build #610

Closed palas closed 8 months ago

palas commented 9 months ago

Changelog

- description: |
    Fixed git revision showed by --version flag when built using nix
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Addresses this issue: https://github.com/IntersectMBO/cardano-cli/tree/bug-all-zeros-git-revision

How to trust this PR

It can be tested with and without the __GIT_REV__ compiler flag and see that it works either way.

The other thing to pay attention to, is that I have only modified the default logic (when both gitRevEmbed and fromGit are empty)

Checklist

palas commented 8 months ago

LGTM. Can you get someone from devx to also review?

@disassembler, could you have a look?