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

Short ref doesn't appear in CI builds #1842

Open
1 task done
Commenter25 opened this issue Aug 25, 2023 · 1 comment
Open
1 task done

Short ref doesn't appear in CI builds #1842

Commenter25 opened this issue Aug 25, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Commenter25
Copy link

Commenter25 commented Aug 25, 2023

Verification

  • I searched for similar bug reports (including closed issues) and found none was relevant.

What happened?

When checking the About or Firmware pages, if running a build from GitHub CI, there will be no short ref

What should happen instead?

There should be one

Reproduction steps

  1. Download and install a release build
  2. Go to the about page and see a commit reference next to short ref (for 1.13, this is 5f3acfad)
  3. Download and install a CI build (this is the 1.13 commit)
  4. Go to the about page and notice a distinct lack of a short ref

Version

v1.13.0

Companion app

Gadgetbridge v0.75.1

@Commenter25 Commenter25 added the bug Something isn't working label Aug 25, 2023
@jensonb
Copy link

jensonb commented Sep 2, 2023

I also noticed this issue as well when building myself. Where does the release build actually come from?

Either way, the git hash is retrieved during the following portion of the build:

set(PROJECT_GIT_COMMIT_HASH "")
execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_GIT_COMMIT_HASH
RESULT_VARIABLE PROJECT_GIT_COMMIT_HASH_SUCCESS)
string(STRIP "${PROJECT_GIT_COMMIT_HASH}" PROJECT_GIT_COMMIT_HASH)
message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS})
message("")
message("BUILD CONFIGURATION")
message("-------------------")
message(" * Mode : " ${CMAKE_BUILD_TYPE})
message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
message(" * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH})
message(" * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH})
message(" * NRF52 SDK : " ${NRF5_SDK_PATH})
message(" * Target device : " ${TARGET_DEVICE})

https://github.com/InfiniTimeOrg/InfiniTime/actions/runs/5364794676/job/14523852337#step:4:55
image

the git command seems to be failing

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

2 participants