Skip to content

Commit

Permalink
add commit in package (#4440)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisChu authored Jul 18, 2022
1 parent 930afc1 commit b87d637
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions package/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ function dump_syms {
done
}

function add_commit {
hash git &> /dev/null
if [ $? -eq 0 ];then
if [ -d ".git" ];then
git rev-parse --short HEAD > ${build_dir}/cpack_output/commit.txt
fi
fi
}

# The main
build $version $enablesanitizer $static_sanitizer $build_type "OFF" "/usr/local/nebula"
package $strip_enable
Expand All @@ -254,3 +263,6 @@ fi
# tar package
build $version $enablesanitizer $static_sanitizer $build_type "ON" "/"
package $strip_enable

# add commit information
add_commit

0 comments on commit b87d637

Please sign in to comment.