build: Archives should have release name as first file name component
This commit is contained in:
parent
0937f85534
commit
668eb7c398
2
build.go
2
build.go
@ -355,6 +355,7 @@ func buildTar(target target) {
|
|||||||
for i := range target.archiveFiles {
|
for i := range target.archiveFiles {
|
||||||
target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.binaryName, 1)
|
target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.binaryName, 1)
|
||||||
target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.binaryName, 1)
|
target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.binaryName, 1)
|
||||||
|
target.archiveFiles[i].dst = name + "/" + target.archiveFiles[i].dst
|
||||||
}
|
}
|
||||||
|
|
||||||
tarGz(filename, target.archiveFiles)
|
tarGz(filename, target.archiveFiles)
|
||||||
@ -378,6 +379,7 @@ func buildZip(target target) {
|
|||||||
for i := range target.archiveFiles {
|
for i := range target.archiveFiles {
|
||||||
target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.binaryName, 1)
|
target.archiveFiles[i].src = strings.Replace(target.archiveFiles[i].src, "{{binary}}", target.binaryName, 1)
|
||||||
target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.binaryName, 1)
|
target.archiveFiles[i].dst = strings.Replace(target.archiveFiles[i].dst, "{{binary}}", target.binaryName, 1)
|
||||||
|
target.archiveFiles[i].dst = name + "/" + target.archiveFiles[i].dst
|
||||||
}
|
}
|
||||||
|
|
||||||
zipFile(filename, target.archiveFiles)
|
zipFile(filename, target.archiveFiles)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user