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

build: support build without git #3309

Merged
merged 4 commits into from
Feb 18, 2024

Conversation

tisonkun
Copy link
Collaborator

@tisonkun tisonkun commented Feb 18, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This closes #3308.

However, this may cause building release sources loses metadata. I wonder if we fallback the meta loading from a file and generate that file on source release, or just use this fallback solution and wait until any issue report. cc @waynexia @shuiyisong @yurivict

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@github-actions github-actions bot added Size: M docs-not-required This change does not impact docs. labels Feb 18, 2024
src/servers/build.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b889d57) 85.51% compared to head (89ddaa0) 85.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3309      +/-   ##
==========================================
- Coverage   85.51%   85.11%   -0.41%     
==========================================
  Files         872      872              
  Lines      141944   141967      +23     
==========================================
- Hits       121390   120831     -559     
- Misses      20554    21136     +582     

src/common/function/src/system/build.rs Outdated Show resolved Hide resolved
src/common/version/src/lib.rs Outdated Show resolved Hide resolved
@yurivict
Copy link

b064f2c still fails:

[servers 0.6.0] thread 'main' panicked at /usr/ports/databases/greptimedb/work/greptimedb-b064f2ced9af344294d85b5524ebb17927ab667d/cargo-crates/build-data-0.1.5/src/lib.rs:524:44:
[servers 0.6.0] called `Result::unwrap()` on an `Err` value: "command 'git log -1 --pretty=%ct' failed: exit=1 stdout='' stderr=''"
[servers 0.6.0] stack backtrace:
[servers 0.6.0]    0: rust_begin_unwind
[servers 0.6.0]    1: core::panicking::panic_fmt
[servers 0.6.0]    2: core::result::unwrap_failed
[servers 0.6.0]    3: core::result::Result<T,E>::unwrap
[servers 0.6.0]    4: build_data::set_SOURCE_TIMESTAMP
[servers 0.6.0]    5: build_script_build::main
[servers 0.6.0]    6: core::ops::function::FnOnce::call_once
[servers 0.6.0] note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

src/servers/build.rs Outdated Show resolved Hide resolved
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Collaborator Author

@yurivict fixed at f320ff2

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun added this pull request to the merge queue Feb 18, 2024
Merged via the queue into GreptimeTeam:main with commit 4e04a4e Feb 18, 2024
14 of 16 checks passed
@tisonkun tisonkun deleted the support_build_without_git branch February 18, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails: error executing 'git rev-parse --abbrev-ref=loose HEAD': No such file or directory (os error 2)
4 participants