2006-12-27 01:11:57 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
|
2011-02-16 13:20:44 +00:00
|
|
|
build_id = open(sys.argv[2], 'w')
|
|
|
|
|
|
|
|
|
|
build_id.write(
|
2006-12-27 10:49:05 +00:00
|
|
|
"""// This file was generated by gen_buildid.py
|
2006-12-27 01:11:57 +00:00
|
|
|
// Do not edit
|
|
|
|
|
|
2006-12-27 10:49:05 +00:00
|
|
|
#include "common/const.h"
|
|
|
|
|
|
2006-12-27 01:11:57 +00:00
|
|
|
namespace consts {
|
|
|
|
|
|
|
|
|
|
const char * buildTime = __TIME__;
|
|
|
|
|
const char * buildDate = __DATE__;
|
2016-01-20 16:14:21 +01:00
|
|
|
const char * buildId = "%s";
|
2006-12-27 01:11:57 +00:00
|
|
|
}
|
2006-12-27 10:49:05 +00:00
|
|
|
""" % sys.argv[1])
|
|
|
|
|
|
2011-02-16 13:20:44 +00:00
|
|
|
build_id.close()
|
|
|
|
|
|
2006-12-27 01:11:57 +00:00
|
|
|
# tail -n 1 ChangeLog | sed "s/^.* 1\.\([0-9]*\).*$/\1/"
|