Skip to content

Commit

Permalink
immutable snapshots timestamp use YYYYMMddHHmm format
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Jul 22, 2020
1 parent a24ad2d commit 7bd2062
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ All tasks will trigger gradle-git's release task which is configured to depend o
* final - Sets the version to the appropriate `<major>.<minor>.<patch>`, creates tag `v<major>.<minor>.<patch>`
* candidate - Sets the version to the appropriate `<major>.<minor>.<patch>-rc.#`, creates tag `v<major>.<minor>.<patch>-rc.#` where `#` is the number of release candidates for this version produced so far. 1st 1.0.0 will be 1.0.0-rc.1, 2nd 1.0.0-rc.2 and so on.
* devSnapshot - Sets the version to the appropriate `<major>.<minor>.<patch>-dev.#+<hash>`, does not create a tag. Where `#` is the number of commits since the last release and `hash` is the git hash of the current commit. If releasing a devSnapshot from a branch not listed in the `releaseBranchPatterns` and not excluded by `excludeBranchPatterns` the version will be `<major>.<minor>.<patch>-dev.#+<branchname>.<hash>`
* You can use `nebula.release.features.replaceDevWithImmutableSnapshot=true` in your `gradle.properties` file to change pattern of version to `<major>.<minor>.<patch>-snapshot.<timestamp>+<hash>`. Where `timestamp` is UTC time in `YYYYMMddHHmmssSSS` format, ex. `20190705210556893` and `hash` is the git hash of the current commit. If releasing a immutableSnapshot from a branch not listed in the `releaseBranchPatterns` and not excluded by `excludeBranchPatterns` the version will be `<major>.<minor>.<patch>-snapshot.<timestamp>+<branchname>.<hash>`
* You can use `nebula.release.features.replaceDevWithImmutableSnapshot=true` in your `gradle.properties` file to change pattern of version to `<major>.<minor>.<patch>-snapshot.<timestamp>+<hash>`. Where `timestamp` is UTC time in `YYYYMMddHHmm` format, ex. `201907052105` and `hash` is the git hash of the current commit. If releasing a immutableSnapshot from a branch not listed in the `releaseBranchPatterns` and not excluded by `excludeBranchPatterns` the version will be `<major>.<minor>.<patch>-snapshot.<timestamp>+<branchname>.<hash>`
* snapshot - Sets the version to the appropriate `<major>.<minor>.<patch>-SNAPSHOT`, does not create a tag.

Use of devSnapshot vs snapshot is a project by project choice of whether you want maven style versioning (snapshot) or semantic versioned snapshots (devSnapshot).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.time.format.DateTimeFormatter
class TimestampUtil {

private static DateTimeFormatter timestampDateFormat = DateTimeFormatter
.ofPattern("YYYYMMddHHmmss")
.ofPattern("YYYYMMddHHmm")
.withZone(ZoneOffset.UTC)

static String getUTCFormattedTimestamp() {
Expand Down

0 comments on commit 7bd2062

Please sign in to comment.