diff --git a/scripts/move_packages.go b/scripts/move_packages.go index a8c8f1fd..5bf59d61 100644 --- a/scripts/move_packages.go +++ b/scripts/move_packages.go @@ -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 } diff --git a/scripts/move_packages_zip_test.go b/scripts/move_packages_zip_test.go index 30b27112..8dfcf414 100644 --- a/scripts/move_packages_zip_test.go +++ b/scripts/move_packages_zip_test.go @@ -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", }, }, }