aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-02-12 11:53:35 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-02-12 11:53:35 +0000
commitcf491357b650d6520a71df5892ba4c32220af242 (patch)
tree6a114b4ac1c68efe74ad3018156c54a731fcc086
parent02c17651bf1d305e79df2b72e7045b4b32b484d1 (diff)
When building tarballs, we also set the timestamp of the generated package. This is meant
to primarily be used for the autobuilds to know from what point in time a particular tarball is, and thus what changes it contains (or not).
-rw-r--r--include/curl/curlver.h11
-rwxr-xr-xmaketgz5
2 files changed, 16 insertions, 0 deletions
diff --git a/include/curl/curlver.h b/include/curl/curlver.h
index c2595d0e3..db48ae5ed 100644
--- a/include/curl/curlver.h
+++ b/include/curl/curlver.h
@@ -53,4 +53,15 @@
*/
#define LIBCURL_VERSION_NUM 0x071002
+/*
+ * This is the date and time when the full source package was created. The
+ * timestamp is not stored in CVS, as the timestamp is properly set in the
+ * tarballs by the maketgz script.
+ *
+ * The format of the date should follow this template:
+ *
+ * "Mon Feb 12 11:35:33 UTC 2007"
+ */
+#define LIBCURL_TIMESTAMP "CVS"
+
#endif /* __CURL_CURLVER_H */
diff --git a/maketgz b/maketgz
index ecd1d76c1..4a42dba22 100755
--- a/maketgz
+++ b/maketgz
@@ -23,12 +23,16 @@ numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`
HEADER=include/curl/curlver.h
CHEADER=src/version.h
+# requires a date command that knows -u for UTC time zone
+datestamp=`date -u`
+
# Replace version number in header file:
sed -e 's/^#define LIBCURL_VERSION .*/#define LIBCURL_VERSION "'$libversion'"/g' \
-e 's/^#define LIBCURL_VERSION_NUM .*/#define LIBCURL_VERSION_NUM 0x'$numeric'/g' \
-e 's/^#define LIBCURL_VERSION_MAJOR .*/#define LIBCURL_VERSION_MAJOR '$major'/g' \
-e 's/^#define LIBCURL_VERSION_MINOR .*/#define LIBCURL_VERSION_MINOR '$minor'/g' \
-e 's/^#define LIBCURL_VERSION_PATCH .*/#define LIBCURL_VERSION_PATCH '$patch'/g' \
+ -e "s/^#define LIBCURL_TIMESTAMP .*/#define LIBCURL_TIMESTAMP \"$datestamp\"/g" \
$HEADER >$HEADER.dist
# Replace version number in header file:
@@ -41,6 +45,7 @@ sed "s/7\.12\.3/$libversion/g" $PLIST > $PLIST.dist
echo "curl version $curlversion"
echo "libcurl version $libversion"
echo "libcurl numerical $numeric"
+echo "datestamp $datestamp"
findprog()
{