allow compilation without git or when git fails by ursfassler · Pull Request #300 · cucumber/cucumber-cpp · GitHub
Skip to content

allow compilation without git or when git fails - #300

Open
ursfassler wants to merge 1 commit into
cucumber:mainfrom
iQiliO:allow-compilation-without-git-repo
Open

ursfassler wants to merge 1 commit into
cucumber:mainfrom
iQiliO:allow-compilation-without-git-repo

Conversation

@ursfassler

@ursfassler ursfassler commented May 9, 2024 •

Copy link
Copy Markdown
Contributor

Summary

Allow compilation without git or when git fails.

Details

This happens when the code is downloaded as source archive. This does not contain the git repository, hence the git version script fails.

Now the version 0.0.0+YEAR.MONTH.DAY is used when we fail to get the version from git.

Motivation and Context

One problem mentioned in #295.

How Has This Been Tested?

Manually by removing the .git directory and adding it back again.
Downloaded the zip archive and did a CMake configure.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • It is my own work, its copyright is implicitly assigned to the project and no substantial part of it has been copied from other sources (including Stack Overflow). In rare occasions this is acceptable, like in CMake modules where the original copyright information should be kept.
  • I'm using the same code standards as the existing code (indentation, spacing, variable naming, ...).
  • I've added tests for my code.
  • I have verified whether my change requires changes to the documentation
  • My change either requires no documentation change or I've updated the documentation accordingly.
  • My branch has been rebased to main, keeping only relevant commits.

This happens when the code is downloaded as source archive. This does not
contain the git repository, hence the git version script fails.
Now the version 0.0.0+YEAR.MONTH.DAY is used when we fail to get the
version from git.
@ursfassler

Copy link
Copy Markdown
Contributor Author

@kreuzberger

kreuzberger commented May 13, 2024 •

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants