diff --git a/bzlrelease/tools/generate_workspace_snippet.sh b/bzlrelease/tools/generate_workspace_snippet.sh index 9e8f4769..9041a96e 100755 --- a/bzlrelease/tools/generate_workspace_snippet.sh +++ b/bzlrelease/tools/generate_workspace_snippet.sh @@ -127,7 +127,7 @@ done [[ "${add_github_src_archive_url}" == true ]] && \ url_templates+=( 'http://github.com/${owner}/${repo}/archive/${tag}.tar.gz' ) [[ "${add_github_release_archive_url}" == true ]] && \ - url_templates+=( 'https://github.com/${owner}/${repo}/releases/download/${tag}/repo_name.${tag}.tar.gz' ) + url_templates+=( 'https://github.com/${owner}/${repo}/releases/download/${tag}/${repo}.${tag}.tar.gz' ) [[ ${#url_templates[@]} -gt 0 ]] || fail "Expected one ore more url templates." # MARK - Ensure that we have a SHA256 value diff --git a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/BUILD.bazel b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/BUILD.bazel index f0fc8af6..ea9f2ae1 100644 --- a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/BUILD.bazel +++ b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/BUILD.bazel @@ -36,7 +36,7 @@ generate_workspace_snippet( sha256_file = ":archive_sha256", template = "workspace_snippet.tmpl", url_templates = [ - "https://mirror.foo.org/${owner}/${repo}/repo_name.${tag}.tar.gz", + "https://mirror.foo.org/${owner}/${repo}/${repo}.${tag}.tar.gz", ], ) diff --git a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/generate_workspace_snippet_test.sh b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/generate_workspace_snippet_test.sh index 6a4f20c7..0e745cd2 100755 --- a/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/generate_workspace_snippet_test.sh +++ b/tests/bzlrelease_tests/rules_tests/generate_workspace_snippet_tests/generate_workspace_snippet_test.sh @@ -56,11 +56,11 @@ assert_match bazel_starlib_dependencies "${actual}" "With Template bazel_starlib actual="$( "${with_sha256_file_and_url_template_sh}" --tag "${tag}" )" assert_match \ - 'https://github.com/cgrindel/bazel-starlib/releases/download/v999.0.0/repo_name.v999.0.0.tar.gz' \ + 'https://github.com/cgrindel/bazel-starlib/releases/download/v999.0.0/bazel-starlib.v999.0.0.tar.gz' \ "${actual}" \ "With SHA256 File and URL Template correct release artifact URL" assert_match \ - 'https://mirror.foo.org/cgrindel/bazel-starlib/repo_name.v999.0.0.tar.gz' \ + 'https://mirror.foo.org/cgrindel/bazel-starlib/bazel-starlib.v999.0.0.tar.gz' \ "${actual}" \ "With SHA256 File and URL Template correct custom URL" assert_no_match 'strip_prefix' "${actual}" "With SHA256 File and URL Template no strip_prefix"