Merge pull request #469 from Madhu-1/driver-version

Update driver version during build time
This commit is contained in:
Humble Devassy Chirammal
2019-07-24 14:41:45 +05:30
committed by GitHub
6 changed files with 24 additions and 11 deletions

View File

@ -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 {