mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
Update driver version during build time
update driver version and add git commit to the image. This will help us to identify what latest git commit image contains. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
@ -39,6 +39,14 @@ func RoundUpToMiB(size int64) int64 {
|
||||
return roundUpSize(requestBytes, MiB)
|
||||
}
|
||||
|
||||
// variables which will be set during the build time
|
||||
var (
|
||||
// GitCommit tell the latest git commit image is built from
|
||||
GitCommit string
|
||||
// DriverVersion which will be driver version
|
||||
DriverVersion string
|
||||
)
|
||||
|
||||
func roundUpSize(volumeSizeBytes, allocationUnitBytes int64) int64 {
|
||||
roundedUp := volumeSizeBytes / allocationUnitBytes
|
||||
if volumeSizeBytes%allocationUnitBytes > 0 {
|
||||
|
Reference in New Issue
Block a user