Skip to content

Commit 34f1c21

Browse files
Use SPDX license identifiers for license in shard.yml (#641)
1 parent c75da04 commit 34f1c21

File tree

6 files changed

+29
-15
lines changed

6 files changed

+29
-15
lines changed

docs/shard.yml.adoc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,14 @@ libraries:
204204
----
205205

206206
*license*::
207-
An http://opensource.org/[OSI license] name or an URL to a license file
208-
(string, recommended).
207+
An https://spdx.github.io/spdx-spec/v3.0.1/annexes/spdx-license-expressions/[SPDX license expression]
208+
or an URL to a license file (string, recommended).
209+
+
210+
The OSI publishes https://opensource.org/licenses-old/category[a list] of open
211+
source licenses and their corresponding SPDX identifiers.
212+
+
213+
Examples: _Apache-2.0_, _GPL-3.0-or-later_, _Apache-2.0 OR MIT_,
214+
_Apache-2.0 WITH Swift-exception_, _https://example.com/LICENSE_.
209215

210216
*repository*::
211217
The URL of the project's canonical repository (string, recommended).

docs/shard.yml.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"license": {
223223
"type": "string",
224224
"title": "license",
225-
"description": "An OSI license name or an URL to a license file"
225+
"description": "An SPDX license expression or an URL to a license file."
226226
},
227227
"repository": {
228228
"type": "string",

man/shard.yml.5

Lines changed: 15 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/shards.1

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/unit/spec_spec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module Shards
2929
it "parse license" do
3030
spec = Spec.from_yaml("name: shards\nversion: 0.1.0\nlicense: BSD-2-Clause")
3131
spec.license.should eq("BSD-2-Clause")
32-
spec.license_url.should eq("http://opensource.org/licenses/BSD-2-Clause")
32+
spec.license_url.should eq("https://spdx.org/licenses/BSD-2-Clause")
3333

3434
spec = Spec.from_yaml("name: shards\nversion: 0.1.0\nlicense: http://example.com/LICENSE")
3535
spec.license.should eq("http://example.com/LICENSE")

src/spec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ module Shards
218218
if license =~ %r(https?://)
219219
license
220220
else
221-
"http://opensource.org/licenses/#{license}"
221+
"https://spdx.org/licenses/#{license}"
222222
end
223223
end
224224
end

0 commit comments

Comments
 (0)