Skip to content

Commit

Permalink
fix issue with zip locations
Browse files Browse the repository at this point in the history
  • Loading branch information
kminehart committed Jul 6, 2023
1 parent 5e41930 commit 230896f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/move_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func EXEHandler(name string) []string {
v = strings.ReplaceAll(v, "deb", "exe")
v = strings.ReplaceAll(v, "amd64", "windows-amd64")
v = strings.ReplaceAll(v, "_", "-")
v = strings.ReplaceAll(v, "~", "-")
v = strings.ReplaceAll(v, "-windows", ".windows")
packages[i] = v
}
Expand Down
14 changes: 10 additions & 4 deletions scripts/move_packages_zip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ import (

var zipMapping = []m{
{
input: "gs://bucket/tag/grafana_v1.2.3_102_windows_amd64.zip",
input: "gs://bucket/tag/grafana_v1.2.3-test.1_102_windows_amd64.zip",
output: []string{
"artifacts/downloads/v1.2.3/oss/release/grafana-1.2.3.windows-amd64.zip",
"artifacts/downloads/v1.2.3-test.1/oss/release/grafana-1.2.3-test.1.windows-amd64.zip",
},
},
{
input: "gs://bucket/tag/grafana_v1.2.3_102_windows_amd64.zip",
input: "file://bucket/tag/grafana_v1.2.3-test.1_102_windows_amd64.zip",
output: []string{
"artifacts/downloads/v1.2.3/oss/release/grafana-1.2.3.windows-amd64.zip",
"artifacts/downloads/v1.2.3-test.1/oss/release/grafana-1.2.3-test.1.windows-amd64.zip",
},
},
{
input: "file://bucket/tag/grafana_main_102_windows_amd64.zip",
output: []string{
"artifacts/downloads/main/oss/release/grafana-main.windows-amd64.zip",
},
},
}
Expand Down

0 comments on commit 230896f

Please sign in to comment.