Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
beeversion: Add two additional format placeholders
Add *E* and *d* as placeholders to format the extra version. Sometimes, the bee version requirement, to separate the extra version with an underscore, contradicts the upstream versioning, which for example uses a dash. 4.8-rc2 is the version of the second release candidate of the Linux kernel 4.8. An underscore has to be used in the bee file version though. ``` $ beeversion linux-4.8_rc2-95.x86_64 PKGNAME=linux PKGEXTRANAME= PKGEXTRANAME_UNDERSCORE= PKGEXTRANAME_DASH= PKGVERSION=( 4.8 4 4.8 ) PKGEXTRAVERSION=rc2 PKGEXTRAVERSION_UNDERSCORE=_rc2 PKGEXTRAVERSION_DASH=-rc2 PKGREVISION=95 PKGARCH=x86_64 PKGFULLNAME=linux PKGFULLVERSION=4.8_rc2 PKGFULLPKG=linux-4.8_rc2-95 PKGALLPKG=linux-4.8_rc2-95.x86_64 PKGSUFFIX= ``` As can be seen, environment variables to output the extra version with a dash (-) or with an underscore (_) are provided. These options are missing as placeholders for the switch `format`. So, add them. *E* adds an underscore in front of the extra version, while *d* adds a dash. These are useful, as now, no additional logic has to be implemented in scripts calling `beeversion`, to check if an extra version is present, to determine if a separator needs to be added or not. In case of the Linux kernel, 4.8-rc2 can be created with the switch below. ``` > beeversion --format="%v%d" linux-4.8_rc2-95.x86_64 4.8-rc2 ```
- Loading branch information