-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,14 @@ class CiReleaseTest extends munit.FunSuite { | |
assertEquals(dropBackPubCommand("1.1.0@+foo/publishSigned"), expectedVer) | ||
} | ||
|
||
test("Commands can be chained") { | ||
assertEquals(backPubVersionToCommand("[email protected]@foo/publishSigned"), ";++2.12.20!;foo/publishSigned") | ||
assertEquals(dropBackPubCommand("[email protected]@foo/publishSigned"), expectedVer) | ||
|
||
assertEquals(backPubVersionToCommand("1.1.0@foo/something@bar/publishSigned"), ";foo/something;bar/publishSigned") | ||
assertEquals(dropBackPubCommand("1.1.0@foo/something@bar/publishSigned"), expectedVer) | ||
} | ||
|
||
test("Treat # as comments") { | ||
assertEquals(backPubVersionToCommand("1.1.0#comment"), "+publishSigned") | ||
assertEquals(dropBackPubCommand("1.1.0#comment"), expectedVer) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -356,6 +356,45 @@ page will look like this: | |
|
||
Enjoy 👌 | ||
|
||
### Back-publishing support | ||
|
||
sbt-ci-release implements a mini-DSL for the Git tag for back publishing purpose, which is useful if you maintain a compiler plugin, library for Scala Native, or an sbt plugin during 2.x migration etc. | ||
|
||
``` | ||
v1.2.3[@3.x|@2.n.x|@a.b.c][@command][#comment] | ||
``` | ||
- `#` is used for comments, which is useful if you need to use the same command multiple times | ||
- `@3.x` expands to `++3.x`, and if no other commands follow, `;++3.x;publishSigned` | ||
- `@2.13.x` expands to `++2.13.x`, and if no other commands follow, `;++2.13.x;publishSigned` | ||
- Other commands such as `@foo/publishSigned` expands to `foo/publishSigned` | ||
#### Case 1: Publish all subprojects for Scala 2.13.15 | ||
`[email protected]` | ||
#### Case 2: Publish all subprojects for Scala 3.x | ||
`[email protected]`. Optionally we can add a comment: `[email protected]#comment`. | ||
We can use this to back publish sbt 2.x plugins. | ||
1. Branch off of `v1.2.3` to create `release/1.2.3` branch, and send a PR to bump sbt version | ||
2. Tag the brach to `[email protected]#sbt2.0.0-Mn` | ||
#### Case 3: Publish some subprojects for Scala 2.13.15 | ||
`[email protected]@foo/publishSigned` | ||
You can create a subproject to aggregate 2 or more subprojects. | ||
#### Case 4: Publish some subprojects for supported Scala versions | ||
`v1.2.3@+foo_native/publishSigned#comment` | ||
1. Branch off of `v1.2.3` to create `release/1.2.3` branch, and send a PR to bump the Scala Native version. | ||
2. Tag the branch to `v1.2.3@+foo_native/publishSigned#native=0.5` | ||
## FAQ | ||
### How do I publish to Sonatype Central? | ||
|