Commit 6851ff5c authored by Hardy Simpson's avatar Hardy Simpson

tools: mk_targz include git version

parent 2873c753
......@@ -135,7 +135,7 @@ void zlog_event_set_fmt(zlog_event_t * a_event,
* and keep unchange though all event's life cycle
* zlog_spec_write_time gettimeofday
*/
memset(&(a_event->time_stamp), 0x00, sizeof(a_event->time_stamp));
a_event->time_stamp.tv_sec = 0;
return;
}
......
......@@ -2,13 +2,15 @@
if [ "$1" = "" ]
then
echo "Usage: mk_targz.sh <git tag, branch or commit>"
echo "Usage: mk_targz.sh <git tag only>"
echo "Example: mktarball.sh 2.2-rc4"
exit 1
fi
PREFIX="zlog-${1}/"
TARBALL="/tmp/zlog-${1}.tar.gz"
HASH=`git show-ref --hash=8 refs/tags/${1}`
PREFIX="zlog-${1}-${HASH}/"
TARBALL="/tmp/zlog-${1}-${HASH}.tar.gz"
git archive --format=tar -v --prefix=$PREFIX $1 | gzip -c > $TARBALL
cp ${TARBALL} /tmp/zlog-latest-stable.tar.gz
#git archive --format=tar -v --prefix=$PREFIX $1 -o $TARBALL
echo "File created: $TARBALL"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment