mirror of https://github.com/databricks/cli.git
rm copy
This commit is contained in:
parent
cc5133a5e4
commit
ba3062b654
|
@ -24,6 +24,8 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) {
|
||||||
|
|
||||||
// The last three parts are always tags
|
// The last three parts are always tags
|
||||||
tagStartIdx := len(parts) - 3
|
tagStartIdx := len(parts) - 3
|
||||||
|
tags := parts[tagStartIdx:]
|
||||||
|
tags[2] = strings.TrimSuffix(tags[2], ".whl")
|
||||||
|
|
||||||
// Everything before the tags except the version is the distribution
|
// Everything before the tags except the version is the distribution
|
||||||
versionIdx := tagStartIdx - 1
|
versionIdx := tagStartIdx - 1
|
||||||
|
@ -32,11 +34,6 @@ func ParseWheelFilename(filename string) (*WheelInfo, error) {
|
||||||
distribution := strings.Join(parts[:versionIdx], "-")
|
distribution := strings.Join(parts[:versionIdx], "-")
|
||||||
version := parts[versionIdx]
|
version := parts[versionIdx]
|
||||||
|
|
||||||
// Extract tags (remove .whl from the last one)
|
|
||||||
tags := make([]string, 3)
|
|
||||||
copy(tags, parts[tagStartIdx:])
|
|
||||||
tags[2] = strings.TrimSuffix(tags[2], ".whl")
|
|
||||||
|
|
||||||
return &WheelInfo{
|
return &WheelInfo{
|
||||||
Distribution: distribution,
|
Distribution: distribution,
|
||||||
Version: version,
|
Version: version,
|
||||||
|
|
Loading…
Reference in New Issue