Skip to content

Commit

Permalink
Updates information on the requireed licenses
Browse files Browse the repository at this point in the history
  • Loading branch information
supersimple committed Jun 11, 2024
1 parent c561e70 commit ba318b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/mix/tasks/hex.build.ex
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ defmodule Mix.Tasks.Hex.Build do
message = [
"The following licenses are not recognized by SPDX:\n",
Enum.map(invalid_licenses, &" * #{&1}\n"),
"\nConsider using licenses from https://spdx.org/licenses"
"\nValid license identifiers are available from https://spdx.org/licenses"
]

Hex.Shell.warn(message)
Expand Down
4 changes: 2 additions & 2 deletions test/mix/tasks/hex.build_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule Mix.Tasks.Hex.BuildTest do

assert_received {:mix_shell, :info,
[
"\e[33mThe following licenses are not recognized by SPDX:\n * CustomLicense\n\nConsider using licenses from https://spdx.org/licenses\e[0m"
"\e[33mThe following licenses are not recognized by SPDX:\n * CustomLicense\n\nValid license identifiers are available from https://spdx.org/licenses\e[0m"
]}

assert package_created?("release_invalid_licenses-0.0.1")
Expand All @@ -77,7 +77,7 @@ defmodule Mix.Tasks.Hex.BuildTest do

refute_received {:mix_shell, :info,
[
"\e[33m\nYou have chosen 1 or more licenses that are not recognized by SPDX\nConsider using a license from https://spdx.org/licenses/\n\e[0m"
"\e[33mThe following licenses are not recognized by SPDX:\n * CustomLicense\n\nValid license identifiers are available from https://spdx.org/licenses\e[0m"
]}

assert package_created?("release_repo_invalid_licenses-0.0.1")
Expand Down

0 comments on commit ba318b0

Please sign in to comment.