Skip to content

Commit 0a85678

Browse files
committed
Merge branch 'master' into release104
2 parents d172b82 + d29787a commit 0a85678

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

README.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,36 @@ Projects using this must ensure the necessary POM sections are overriden - these
4040
<url>https://github.com/bordertech/java-common/</url>
4141
```
4242

43-
Once you have configured your project and environment you can release to Maven Central with a command like so:
43+
Once you have configured your project and environment you can release to Maven Central. It may look a little something like the examples below.
4444

45-
```mvn release:clean release:prepare release:perform -Psonatype-oss-release```
45+
### Example Releasing
46+
The golden rule is ALWAYS do this on a separate branch (it makes [backing out](https://github.com/BorderTech/java-common/wiki/Releasing#dealing-with-failure) much easier when problems arise).
4647

47-
or, to skip tests:
48+
```bash
49+
# make sure you are on the main/default branch
50+
git checkout master # or "git checkout bobbie" etc
4851

49-
```mvn release:clean release:prepare release:perform -Psonatype-oss-release -Darguments="-DskipTests"```
52+
# fetch latest changes from main repository
53+
git fetch origin # or "git fetch upstream" if you are on a fork
54+
55+
# ensure local branch is up-to-date
56+
git merge origin/master # or "git merge upstream/master" or "git merge upstream/bobbie" etc
57+
58+
# create a new release branch (you could skip this step if it already exists which it probably shouldn't)
59+
git branch release-xyz # "git branch release-123" etc
60+
61+
# switch to release branch
62+
git checkout release-xyz # "git checkout !$" is easier :)
63+
64+
# perform the release
65+
mvn release:clean release:prepare release:perform -Psonatype-oss-release
66+
```
67+
68+
or to skip tests while releasing add `-Darguments="-DskipTests"`:
69+
70+
```
71+
mvn release:clean release:prepare release:perform -Psonatype-oss-release -Darguments="-DskipTests"
72+
```
5073

5174

5275
Full documentation is available in the wiki under [Releasing](https://github.com/BorderTech/java-common/wiki/Releasing)

0 commit comments

Comments
 (0)