Skip to content

Commit c961629

Browse files
authored
Merge pull request #2 from windymelt/versioning-using-git
release settings
2 parents 0242166 + af76443 commit c961629

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

build.sc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
2+
import de.tobiasroeser.mill.vcs.version.VcsVersion
3+
14
import mill._, scalalib._
5+
import publish._
26

3-
object qw extends RootModule with ScalaModule {
7+
object qw extends RootModule with ScalaModule with PublishModule {
48
def scalaVersion = "3.3.0"
5-
def publishVersion = "0.1.1-SNAPSHOT"
9+
def pomSettings = PomSettings(
10+
description = artifactName(),
11+
organization = "io.github.windymelt",
12+
url = "https://github.com/windymelt/qw.scala",
13+
licenses = Seq(License.MIT),
14+
versionControl = VersionControl.github("windymelt", "qw.scala"),
15+
developers = Seq(
16+
Developer("windymelt", "windymelt", "https://github.com/windymelt")
17+
)
18+
)
19+
override def publishVersion: T[String] = VcsVersion.vcsState().format()
20+
621
object test extends ScalaTests with TestModule.Munit {
722
def ivyDeps = Agg(ivy"org.scalameta::munit::0.7.29")
823
}

src/main/scala/io/github/windymelt/qw/Syntax.scala

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
package io.github.windymelt.qw
22

3+
/** Enables qw syntax for string.
4+
*
5+
* {{{
6+
* import io.github.windymelt.qw.Syntax.*
7+
* qw"foo bar buzz" // => "foo" :: "bar" :: "buzz" :: Nil
8+
* }}}
9+
*
10+
* You can use newline for separator too:
11+
*
12+
* {{{
13+
* qw"""
14+
* new
15+
* line
16+
* separated
17+
* """ // => "new" :: "line" :: "separated" :: Nil
18+
* }}}
19+
*/
320
object Syntax:
421
extension (sc: StringContext)
22+
/** Splits strings with whitespace character and constructs
23+
* [[List[String]]].
24+
*/
525
def qw(args: String*): List[String] =
626
val strings = sc.parts.iterator
727
val expressions = args.iterator

0 commit comments

Comments
 (0)