| |
| |
| |
| |
|
|
|
|
| |
| get_last_modified_date() |
| { |
| local filename=$1 |
| RESULT=`git log -1 --format="%ad" --date=format:'%b %d, %Y' -- $filename` |
| } |
|
|
| get_dlib_version() |
| { |
| cat ../dlib/CMakeLists.txt | awk '/set\(CPACK_PACKAGE_VERSION_'$1'/{ match($2,"\"(.*)\"",a); print a[1]}' |
| } |
|
|
| |
| dump_repo_to() |
| { |
| mkdir -p $1 |
| git archive HEAD `git rev-parse --show-toplevel` | tar -xC $1 |
| } |
|
|
| |
| git_logs_as_xml() |
| { |
| local logrange=$1 |
| local outfile=$2 |
|
|
| |
| local paths="../dlib ../examples ../tools ../python_examples" |
|
|
| (echo "<log>"; git log --stat=80 --date=iso-strict --pretty=format:"</files_changed></logentry>%n<logentry revision=\"%H\">%n<author email=\"%ae\">%an</author>%n<date>%ad</date>%nGIT_COMMIT_MESSAGE_BEGIN%sGIT_COMMIT_MESSAGE_END%n<files_changed>%n" $logrange $paths | tail -n+2 ; echo; echo '</files_changed></logentry>' ; echo "</log>" ) > $outfile |
|
|
| |
| sed -e '/GIT_COMMIT_MESSAGE_BEGIN.*GIT_COMMIT_MESSAGE_END/ { s/</\</g; s/>/\>/g; s/&/&/g; s/GIT_COMMIT_MESSAGE_BEGIN/<msg>/g; s/GIT_COMMIT_MESSAGE_END/<\/msg>/g; }' -i $outfile |
|
|
| |
| sed -e ':a' -e 'N' -e '$!ba' -e "s/<files_changed>[ \n]*/<files_changed> /g" -e "s/[ \n]*<\/files_changed>/<\/files_changed>/g" -i $outfile |
| } |
|
|
| |
| set_dlib_version() |
| { |
| sed -i -e 's/\(set(CPACK_PACKAGE_VERSION_'$1' *"\).*\(".*\)/\1'$2'\2/' ../dlib/CMakeLists.txt |
| } |
|
|
| MAJOR_NUM=`get_dlib_version MAJOR` |
| MINOR_NUM=`get_dlib_version MINOR` |
| PATCH_NUM=`get_dlib_version PATCH` |
|
|