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 builds from 'git archive' generated tarballs #2187

Merged
merged 2 commits into from
May 30, 2024

Conversation

alerque
Copy link
Contributor

@alerque alerque commented Apr 15, 2024

The current release can be build from git clone sources because running git rev-parse HEAD at build time works, but it fails to build from an archive tarball such as is generated by GitHub when you download the source link on a release and generated with git archive.

This fixes that by first checking an env var that a user can set by using export TAR_COMMIT_ID=$(git get-tar-commit-id <package>.tar.gz). It isn't a pancea and requires some intervention, but at least it makes it possible to build without a patch, etc.

build.rs Outdated Show resolved Hide resolved
@alerque alerque force-pushed the build-from-archive branch from 4d1780c to cfc2ae9 Compare April 15, 2024 18:44
@extrawurst
Copy link
Owner

@alerque please add a changelog entry matching other contributions

@alerque alerque force-pushed the build-from-archive branch from cfc2ae9 to 53cdd8a Compare May 15, 2024 10:26
@alerque alerque requested a review from extrawurst May 15, 2024 10:26
@extrawurst extrawurst merged commit d1ebc56 into extrawurst:master May 30, 2024
16 of 18 checks passed
@extrawurst
Copy link
Owner

thanks for your contribution. note that i will change the env name to BUILD_GIT_COMMIT_ID. hope that is ok

@alerque alerque deleted the build-from-archive branch May 30, 2024 14:42
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
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