Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatic version-number generation from git describe
- Loading branch information
Sound and Fury
committed
Jul 27, 2010
1 parent
709dc6b
commit 15e4136
Showing
4 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
quirc | ||
*.o | ||
.quirc-shadow | ||
version.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$(git describe --tags) | ||
read MAJOR MINOR REVS GIT <<< ${VERSION//[-.]/ } | ||
|
||
cat >version.h <<_EOM | ||
/* | ||
quIRC - simple terminal-based IRC client | ||
Copyright (C) 2010 Edward Cree | ||
See quirc.c for license information | ||
version.h: contains version number (generated from git describe) | ||
*/ | ||
#pragma once | ||
#define VERSION_MAJ $MAJOR // Major version | ||
#define VERSION_MIN $MINOR // Minor version | ||
#define VERSION_REV $REVS // Revision number | ||
#define VERSION_TXT "$GIT" // Rest of git describe | ||
_EOM |