build system: add setlocalversion

Version is built from git commit id, for example wmfs-ga33ec04-dirty
-> 'g', this is a git repo
-> a33ec04 is the beginning of the commit id (sha1)
-> dirty mean that there is uncommitted changes

wmfs users gives their 'wmfs -v' and developers can easily identify wmfs
version.

Move status.sh to scripts/ with setlocalversion

Signed-off-by: Philippe Pepiot <phil@philpep.org>
This commit is contained in:
Philippe Pepiot
2011-04-16 20:52:28 +02:00
parent a33ec045ab
commit e57a6c5e62
5 changed files with 75 additions and 3 deletions

View File

@@ -127,7 +127,7 @@ infobar_init(void)
barwin_refresh(infobar[sc].bar);
/* Default statustext is set here */
infobar[sc].statustext = xstrdup(WMFS_VERSION);
infobar[sc].statustext = xstrdup("wmfs"WMFS_VERSION);
infobar_draw(sc);
}

View File

@@ -486,7 +486,7 @@ main(int argc, char **argv)
break;
case 'v':
printf("WMFS "WMFS_VERSION"\n");
printf("wmfs"WMFS_VERSION"\n");
exit(EXIT_SUCCESS);
break;