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

[misc] Use configured headers to track version and commit hash #3349

Merged
merged 3 commits into from
Nov 3, 2021
Merged

[misc] Use configured headers to track version and commit hash #3349

merged 3 commits into from
Nov 3, 2021

Conversation

sjwsl
Copy link
Collaborator

@sjwsl sjwsl commented Nov 2, 2021

Instead of generating headers manually, use a more standard way to track the version and commit hash. It is easier to maintain and understand now.

Test on my local machine by building different versions.

This is the prerequisite for #3354.

@netlify
Copy link

netlify bot commented Nov 2, 2021

✔️ Deploy Preview for jovial-fermat-aa59dc canceled.

🔨 Explore the source changes: fa9c9ea

🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/6180f8125b0e420007357020

@sjwsl sjwsl changed the title [Build] Use configured headers to track version and commit hash [misc] Use configured headers to track version and commit hash Nov 2, 2021
@sjwsl sjwsl mentioned this pull request Nov 2, 2021
@sjwsl sjwsl requested review from ailzhang and k-ye November 2, 2021 11:08
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Yesss! Nice work!

"#define TI_VERSION_PATCH \"${TI_VERSION_PATCH}\"\n"
"#define TI_CUDAVERSION \"${CUDA_VERSION}\"\n"
)
configure_file(taichi/common/version.h.in version.h)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we somehow still keep these headers in taichi/common folder? ;)

Copy link
Collaborator Author

@sjwsl sjwsl Nov 3, 2021

Choose a reason for hiding this comment

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

Sure. Which one do you think is better?

  1. add .in suffix to distinguish the files before and after processing
  2. or just process them in place

Copy link
Contributor

Choose a reason for hiding this comment

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

@sjwsl let's keep the .in suffix so that we know what happened there :D Thanks a lot!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Got it. But I accidentally deleted my local branch so can't update this PR now... Could you help merge this first and then I will give another PR for this. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

sure!

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

@ailzhang ailzhang merged commit b08d208 into taichi-dev:master Nov 3, 2021
sjwsl added a commit to sjwsl/taichi that referenced this pull request Nov 3, 2021
…i-dev#3349)

* [Build] Use configured header file to track version and commit hash

* fix
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