Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Sources Build - Git Error #875

Closed
Asgaror opened this issue Sep 9, 2021 · 1 comment
Closed

Release Sources Build - Git Error #875

Asgaror opened this issue Sep 9, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Asgaror
Copy link
Contributor

Asgaror commented Sep 9, 2021

Describe the bug
Building the sources from release produces error messages although the build succeeds:
fatal: not a git repository (or any of the parent directories): .git

Environment information:

  • OS: Linux 5.11.0-27-generic x86_64

Steps to Reproduce
Steps to reproduce the behavior:

  1. Download sources https://github.com/skycoin/skywire/archive/refs/tags/v0.4.2.zip
  2. Extract and enter directory
  3. Execute make build
  4. See error: fatal: not a git repository (or any of the parent directories): .git

Actual behavior
Building the source should not produce any error messages even if there is no initialized .git repository.

Expected behavior
make build of sources from any release should not produce the error message.

Additional context
The Makefile commands in:

@Asgaror Asgaror added the bug Something isn't working label Sep 9, 2021
@0pcom
Copy link
Collaborator

0pcom commented Sep 9, 2021

I identified this issue.

The context of it's occurrence is in any build which uses the source archive for a particular versioned release rather than just the latest commits on whichever branch. It's a smaller download to use the source archive, and the build is more consistent.

the skywire AUR PKGBUILD

My solution above is to manually version to the tag version in the build, with the necessary lines borrowed (and modified) from the Makefile.

The general solution would be to specifically alter how the versions are generated in the release archive- in order to not have to use git for the versioning. I don't think it's bad to use git for versioning, nor do i think it should stop being used; but it remains unclear how to sufficiently reduce the size of the .git folder to the point it would not needlessly bloat the archive for the simple purpose of supplying the version.

ppcamp added a commit to ppcamp/skywire that referenced this issue Nov 13, 2021
It solves the error raised when building the application when you don't clone the repository from
github. This change also allows the user to set manually the VERSION and the COMMIT using
environment variables

fix skycoin#875
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants