Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for auto-updated version information
The Makefile will now use a script (autoversion.sh) to update version.h, which in turn defines a VERSION string and gets included from common.h. The idea is that version.h normally receives a git-describe based identifier that represents the current checkout. In cases where git might not be available, e.g. for builds from a tarball, the script will instead fall back to a predefined version (that should reflect the most recent release tag). Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
- Loading branch information
Showing
4 changed files
with
31 additions
and
7 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
sunxi-fexc | ||
bin2fex | ||
fex2bin | ||
sunxi-bootinfo | ||
sunxi-fel | ||
sunxi-pio | ||
sunxi-fexc | ||
sunxi-nand-part | ||
sunxi-pio | ||
version.h | ||
*.o | ||
*.swp |
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,18 @@ | ||
# | ||
# This script auto-updates a VERSION string definition. | ||
# It outputs informational messages to stderr, while the actual | ||
# output (on stdout) can easily be redirected to a file. | ||
# | ||
|
||
LATEST_RELEASE="v1.3" | ||
|
||
if VER=`git describe --tags --dirty --always`; then | ||
echo "Setting version information: ${VER}" >&2 | ||
else | ||
VER=${LATEST_RELEASE} | ||
echo "Unable to determine current version (using \"${VER}\" as fallback)" >&2 | ||
fi | ||
echo >&2 | ||
|
||
echo "/* Auto-generated information. DO NOT EDIT */" | ||
echo "#define VERSION \"${VER}\"" |
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