-
Notifications
You must be signed in to change notification settings - Fork 254
HIVE-2862: Remove python dependency from makefile #2692
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: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. We should be able to delete version2.py as part of this PR, yes? |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,25 @@ | ||||||
#!/bin/bash | ||||||
declare -r UNKNOWN_BRANCH_PREFIX="0.0" | ||||||
declare -r MASTER_BRANCH_PREFIX="1.2" | ||||||
|
||||||
function prefix_from_branch() { | ||||||
declare -r branch_name="$1" | ||||||
|
||||||
if [[ "$branch_name" =~ ^([^/]+/)?mce-([[:digit:]]+.[[:digit:]]+) ]]; then | ||||||
echo "${BASH_REMATCH[2]}" | ||||||
elif [[ "$branch_name" =~ ^([^/]+/)?master$ ]]; then | ||||||
echo "$MASTER_BRANCH_PREFIX" | ||||||
else | ||||||
echo "$UNKNOWN_BRANCH_PREFIX" | ||||||
fi | ||||||
} | ||||||
|
||||||
function commit_count() { | ||||||
git rev-list --count "$(git rev-list --max-parents=0 HEAD)..HEAD" | ||||||
} | ||||||
|
||||||
function short_sha() { | ||||||
git rev-parse --short HEAD | ||||||
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. To be compatible with the existing functionality, this should be
Suggested change
|
||||||
} | ||||||
|
||||||
echo "$(prefix_from_branch "$(git rev-parse --abbrev-ref HEAD)").$(commit_count)-$(short_sha)" | ||||||
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. To be compatible with the existing functionality, we need to include the
Suggested change
...or in the Makefile as noted above. |
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.
To be compatible with the existing functionality, this needs to include the
v
prefix, either by prepending it here...or by including it in the output of version2.sh as noted below.