This repository has been archived by the owner on Feb 16, 2020. It is now read-only.
forked from dustin/mac-zfs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Bandlem.com identifiers and versions
The version number is now calculated automatically and is updated whenever the project is built, based on the git version. The version number is calculated from git describe as: maczfs_<onnv>-<rel>-<commit>-hash
- Loading branch information
Showing
3 changed files
with
106 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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/awk | ||
# | ||
# Mac ZFS 'official' releases are tagged as follows: | ||
# | ||
# maczfs_<onnvsnyc>(-<rel>)? | ||
# | ||
# where onnvsync is the number corresponding to the onnv release | ||
# e.g. maczfs_72 corresponds with onnv_72 | ||
# | ||
# Should additional releases on the same tag happen, then they | ||
# will be denoted as: | ||
# maczfs_72-01 | ||
# maczfs_72-02 | ||
# and so on | ||
# | ||
# These are then pulled out with git describe to get the offset | ||
# from the original release e.g. | ||
# maczfs_72-8-g626d83e | ||
# | ||
# The -8- indicates 8 commits since maczfs_72 was released; the | ||
# g626d83e is commit node at the current stage. From this, we | ||
# can recreate any version of the build. | ||
# | ||
# These are merged into version numbers as follows: | ||
# | ||
# <onnvsync>.<rel>.<commits> | ||
# | ||
# If rel is missing in the original tag, then it is treated as 0. | ||
# | ||
# So, a git describe of: | ||
# | ||
# maczfs_72-8-g626d83e | ||
# | ||
# will result in a version of 72.0.8, whilst a git describe of: | ||
# | ||
# maczfs_72-01-3-b58df311 | ||
# | ||
# will result in a version number of 72.1.3. | ||
# | ||
# This version number is used as the kernel module version, the | ||
# ZFS project identifier, and the Info.plist entries, as stamped by the | ||
# build script in the zfs.kext target. | ||
# | ||
BEGIN { | ||
FS = "_|-"; | ||
} | ||
|
||
function max(a,b) { | ||
if (int(a)<int(b)) | ||
return int(a) | ||
else | ||
return int(b) | ||
} | ||
|
||
/maczfs_/ { | ||
ONNV = $2 | ||
if (NF<5) { | ||
REL = 0 | ||
COMMIT = max($3,99) | ||
} else { | ||
REL = max($3,99) | ||
COMMIT = max($4,99) | ||
} | ||
print ONNV "." REL "." COMMIT | ||
} | ||
|
||
|
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