]> jfr.im git - solanum.git/blobdiff - scripts/application.sh
providers/opm: use a name that makes more sense for this variable
[solanum.git] / scripts / application.sh
index f3da0b7dd9add65534273fe608ff0aea88eaa1de..a04ec371df72a03c77dd6ff5a36c74dfef8ad606 100755 (executable)
@@ -24,10 +24,13 @@ if [ "x$TIP" = "x" ]; then
        exit
 fi
 
-# Charybdis wants the hg tip to be in include/serno.h, in its own format.
-MYTIP=`hg parents --template '#date|shortdate#_#node|short#' 2>/dev/null | sed -e s/-//g -e s/_/-/`
-echo "[atheme-services] Generating include/serno.h for tip $MYTIP."
+# Charybdis wants the git head to be in include/serno.h, in its own format.
+SERNO=`git log -1 --date=format:%Y%m%d --pretty=format:%cd-%h`
+DATECODE=`git log -1 --pretty=format:%ct`
+
+echo "[charybdis] Generating include/serno.h for tip $MYTIP."
 cat << _EOF_ > include/serno.h
 /* Generated automatically by makepackage. Any changes made here will be lost. */
-#define SERNO "$MYTIP"
+#define SERNO "$SERNO"
+#define DATECODE "$DATECODE"
 _EOF_