-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Base.GIT_VERSION_INFO
: record the Buildkite commit that was used to build Julia
#43073
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ echo " date_string::String" | |
echo " tagged_commit::Bool" | ||
echo " fork_master_distance::Int" | ||
echo " fork_master_timestamp::Float64" | ||
echo " build_system_commit::String" | ||
echo " build_system_commit_short::String" | ||
echo "end" | ||
echo "" | ||
|
||
|
@@ -82,6 +84,16 @@ if [ -z "$fork_master_timestamp" ]; then | |
fork_master_timestamp="0" | ||
fi | ||
|
||
build_system_directory="../.buildkite" | ||
if [[ -d "${build_system_directory}/.git" ]]; then | ||
build_system_commit=$(git -C "${build_system_directory}" rev-parse HEAD) | ||
build_system_commit_short=$(git -C "${build_system_directory}" rev-parse --short HEAD) | ||
else | ||
echo "Warning: The build system directory does not exist or is not a Git repo: ${build_system_directory}" >&2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this? |
||
build_system_commit="" | ||
build_system_commit_short="" | ||
fi | ||
|
||
echo "const GIT_VERSION_INFO = GitVersionInfo(" | ||
echo " \"$commit\"," | ||
echo " \"$commit_short\"," | ||
|
@@ -90,5 +102,7 @@ echo " $build_number," | |
echo " \"$date_string\"," | ||
echo " $tagged_commit," | ||
echo " $fork_master_distance," | ||
echo " $fork_master_timestamp." | ||
echo " $fork_master_timestamp.," | ||
echo " \"$build_system_commit\"," | ||
echo " \"$build_system_commit_short\"," | ||
echo ")" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a
/bin/sh
script so this errors.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which part errors? I just ran the following locally inside
/bin/sh
, and it seemed to work fine for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably
/bin/sh
isbash
for you then. On Ubuntu, at least,/bin/sh
isdash
by default, and there you getThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#43196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[[
is a bashism