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

Allow make to build image when .git directory is missing #1712

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Allow make to build image when .git directory is missing #1712

merged 1 commit into from
Jul 1, 2021

Conversation

dekobon
Copy link
Contributor

@dekobon dekobon commented Jun 30, 2021

This change fixes #1711.

When executing make and building from a downloaded source archive, there is no git history (.git directory) in the source directory. This condition causes the make build process to fail.

Proposed changes

This change allows the build to continue despite that directory being missing. It does that by using dummy values for GIT_COMMIT and GIT_TAG within the Makefile. For GIT_COMMIT it uses the 7 character value unknown which aligns with the 7 character git hash typically used. For GIT_TAG, it uses a dummy value of untagged to indicate that there is no tag associated with the build.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

Fixes #1711
When executing make and building from a downloaded source
archive, there is no git history (.git directory) in the
source directory. This change allows the build to continue
despite that directory being missing. It does that by using
dummy values for GIT_COMMIT and GIT_TAG.
@netlify
Copy link

netlify bot commented Jun 30, 2021

👷 Deploy request for nginx-kubernetes-ingress accepted.

🔨 Explore the source changes: bbe138d

🔍 Inspect the deploy log: https://app.netlify.com/sites/nginx-kubernetes-ingress/deploys/60dcf0d6b83cb900087f1ed5

Copy link
Member

@lucacome lucacome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dekobon LGTM!

@lucacome lucacome merged commit a79f1d3 into nginxinc:master Jul 1, 2021
@lucacome lucacome added the chore Pull requests for routine tasks label Jul 1, 2021
@pleshakov pleshakov changed the title fix: allow make to build image when .git directory is missing Allow make to build image when .git directory is missing Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make process fails for source trees without .git directory
3 participants