mirror of
https://github.com/harness/drone.git
synced 2025-05-05 15:32:56 +00:00
[fix]: [AH-1262]: Fix get files api for maven when artifact id contains dot (#3730)
* [fix]: [AH-1262]: Fix get files api when artifact id contains dot * [fix]: [AH-1262]: Fix get files api when artifact id contains dot * [fix]: [AH-1262]: Fix get files api when artifact id contains dot
This commit is contained in:
parent
8f7e024c9b
commit
c91ba3d8d3
@ -22,9 +22,12 @@ import (
|
||||
)
|
||||
|
||||
func GetMavenFilePath(imageName string, version string) string {
|
||||
artifactName := strings.ReplaceAll(imageName, ".", "/")
|
||||
artifactName = strings.ReplaceAll(artifactName, ":", "/")
|
||||
filePathPrefix := "/" + artifactName
|
||||
parts := strings.SplitN(imageName, ":", 2)
|
||||
filePathPrefix := "/"
|
||||
if len(parts) == 2 {
|
||||
groupID := strings.ReplaceAll(parts[0], ".", "/")
|
||||
filePathPrefix += groupID + "/" + parts[1]
|
||||
}
|
||||
if version != "" {
|
||||
filePathPrefix += "/" + version
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user