Skip to content

Commit

Permalink
Version in the npm.tgz filename should start with a "v"
Browse files Browse the repository at this point in the history
  • Loading branch information
zerok committed Sep 1, 2023
1 parent 4f9be5f commit b0372fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions scripts/move_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ func NPMHandler(name string) []string {
file = filepath.Base(name)
)

// The version part of the filename should start with a v:
if !strings.Contains(file, "v"+version) {
file = strings.Replace(file, version, "v"+version, 1)
}

return []string{fmt.Sprintf(npmFormat, version, file)}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/move_packages_npm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var npmMapping = []m{
{
input: "file://dist/tag/grafana_10.2.0-pre_WxeEXjDuHTPB_linux_arm64/npm-artifacts/@grafana-data-10.2.0-pre.tgz",
output: []string{
"artifacts/npm/v10.2.0-pre/npm-artifacts/@grafana-data-10.2.0-pre.tgz",
"artifacts/npm/v10.2.0-pre/npm-artifacts/@grafana-data-v10.2.0-pre.tgz",
},
},
}
Expand Down

0 comments on commit b0372fc

Please sign in to comment.