Skip to content

Commit dbcad25

Browse files
committed
Add missing reference docs for publish.* directives
1 parent 64756e4 commit dbcad25

File tree

2 files changed

+77
-1
lines changed

2 files changed

+77
-1
lines changed

modules/directives/src/main/scala/scala/build/preprocessing/directives/Publish.scala

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,48 @@ import scala.cli.commands.SpecificationLevel
1313
@DirectivePrefix("publish.")
1414
@DirectiveExamples("//> using publish.organization io.github.myself")
1515
@DirectiveExamples("//> using publish.name my-library")
16+
@DirectiveExamples("//> using publish.moduleName scala-cli_3")
1617
@DirectiveExamples("//> using publish.version 0.1.1")
18+
@DirectiveExamples("//> using publish.url https://github.com/VirtusLab/scala-cli")
19+
@DirectiveExamples("//> using publish.license MIT")
20+
@DirectiveExamples("//> using publish.vcs https://github.com/VirtusLab/scala-cli.git")
21+
@DirectiveExamples("//> using publish.vcs github:VirtusLab/scala-cli")
22+
@DirectiveExamples("//> using publish.description \"Lorem ipsum dolor sit amet\"")
23+
@DirectiveExamples("//> using publish.developer alexme|Alex Me|https://alex.me")
24+
@DirectiveExamples(
25+
"//> using publish.developers alexme|Alex Me|https://alex.me Gedochao|Gedo Chao|https://github.com/Gedochao"
26+
)
27+
@DirectiveExamples("//> using publish.scalaVersionSuffix _2.13")
28+
@DirectiveExamples("//> using publish.scalaVersionSuffix _3")
29+
@DirectiveExamples("//> using publish.scalaPlatformSuffix _sjs1")
30+
@DirectiveExamples("//> using publish.scalaPlatformSuffix _native0.4")
1731
@DirectiveUsage(
18-
"//> using publish.(organization|name|version) [value]",
32+
"//> using publish.[key] [value]",
1933
"""`//> using publish.organization` value
2034
|
2135
|`//> using publish.name` value
2236
|
37+
|`//> using publish.moduleName` value
38+
|
2339
|`//> using publish.version` value
2440
|
41+
|`//> using publish.url` value
42+
|
43+
|`//> using publish.license` value
44+
|
45+
|`//> using publish.vcs` value
46+
|`//> using publish.scm` value
47+
|`//> using publish.versionControl` value
48+
|
49+
|`//> using publish.description` value
50+
|
51+
|`//> using publish.developer` value
52+
|`//> using publish.developers` value1 value2
53+
|
54+
|`//> using publish.scalaVersionSuffix` value
55+
|
56+
|`//> using publish.scalaPlatformSuffix` value
57+
|
2558
|""".stripMargin
2659
)
2760
@DirectiveDescription("Set parameters for publishing")

website/docs/reference/directives.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,17 +243,60 @@ Set parameters for publishing
243243

244244
`//> using publish.name` value
245245

246+
`//> using publish.moduleName` value
247+
246248
`//> using publish.version` value
247249

250+
`//> using publish.url` value
251+
252+
`//> using publish.license` value
253+
254+
`//> using publish.vcs` value
255+
`//> using publish.scm` value
256+
`//> using publish.versionControl` value
257+
258+
`//> using publish.description` value
259+
260+
`//> using publish.developer` value
261+
`//> using publish.developers` value1 value2
262+
263+
`//> using publish.scalaVersionSuffix` value
264+
265+
`//> using publish.scalaPlatformSuffix` value
266+
248267

249268

250269
#### Examples
251270
`//> using publish.organization io.github.myself`
252271

253272
`//> using publish.name my-library`
254273

274+
`//> using publish.moduleName scala-cli_3`
275+
255276
`//> using publish.version 0.1.1`
256277

278+
`//> using publish.url https://github.com/VirtusLab/scala-cli`
279+
280+
`//> using publish.license MIT`
281+
282+
`//> using publish.vcs https://github.com/VirtusLab/scala-cli.git`
283+
284+
`//> using publish.vcs github:VirtusLab/scala-cli`
285+
286+
`//> using publish.description "Lorem ipsum dolor sit amet"`
287+
288+
`//> using publish.developer alexme|Alex Me|https://alex.me`
289+
290+
`//> using publish.developers alexme|Alex Me|https://alex.me Gedochao|Gedo Chao|https://github.com/Gedochao`
291+
292+
`//> using publish.scalaVersionSuffix _2.13`
293+
294+
`//> using publish.scalaVersionSuffix _3`
295+
296+
`//> using publish.scalaPlatformSuffix _sjs1`
297+
298+
`//> using publish.scalaPlatformSuffix _native0.4`
299+
257300
### Publish (CI)
258301

259302
Set CI parameters for publishing

0 commit comments

Comments
 (0)