|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## 5.0.0 |
| 4 | + |
| 5 | +##### Features |
| 6 | +* Add GitHub Actions, GitLab CI and Jenkins environment variable support |
| 7 | + * GitHub Actions: if `$GITHUB_ACTIONS == true`, `GITHUB_REF` is considered |
| 8 | + * GitLab CI: if `$GITLAB_CI == true`, `CI_COMMIT_BRANCH` and `CI_COMMIT_TAG` are considered |
| 9 | + * Circle CI: if `$CIRCLECI == true`, `CIRCLE_BRANCH` and `CIRCLE_TAG` are considered |
| 10 | + * Jenkins: if `JENKINS_HOME` is set, `BRANCH_NAME` and `TAG_NAME` are considered |
| 11 | +* Simplify configuration (also see BREAKING CHANGES) |
| 12 | + |
| 13 | + **Groovy DSL Example:** `build.gradle` |
| 14 | + ```groovy |
| 15 | + version = '0.0.0-SNAPSHOT' |
| 16 | + gitVersioning.apply { |
| 17 | + refs { |
| 18 | + branch('.+') { |
| 19 | + version = '${ref}-SNAPSHOT' |
| 20 | + } |
| 21 | + tag('v(?<version>.*)') { |
| 22 | + version = '${ref.version}' |
| 23 | + } |
| 24 | + } |
| 25 | + |
| 26 | + // optional fallback configuration in case of no matching ref configuration |
| 27 | + rev { |
| 28 | + version = '${commit}' |
| 29 | + } |
| 30 | + } |
| 31 | + ``` |
| 32 | + |
| 33 | + **Kotlin DSL Example:** `build.gradle.kts` |
| 34 | + ```kotlin |
| 35 | + version = "0.0.0-SNAPSHOT" |
| 36 | + gitVersioning.apply { |
| 37 | + refs { |
| 38 | + branch(".+") { |
| 39 | + version = "\${ref}-SNAPSHOT" |
| 40 | + } |
| 41 | + tag('v(?<version>.*)') { |
| 42 | + version = "\${ref.version}" |
| 43 | + } |
| 44 | + } |
| 45 | + |
| 46 | + // optional fallback configuration in case of no matching ref configuration |
| 47 | + rev { |
| 48 | + version = "\${commit}" |
| 49 | + } |
| 50 | + } |
| 51 | + ``` |
| 52 | +* New option to consider tag configs on branches (attached HEAD), enabled by `refs { considerTagsOnBranches = true }` |
| 53 | + * If enabled, first matching branch or tag config will be used for versioning |
| 54 | +
|
| 55 | +##### BREAKING CHANGES |
| 56 | +* There is no default config anymore, if no `ref` configuration is matching current git situation and no `rev` configuration has been |
| 57 | + defined a warning message will be logged and plugin execution will be skipped. |
| 58 | +* Placeholder Changes (old -> new) |
| 59 | + * `${branch}` -> `${ref}` |
| 60 | + * `${tag}` -> `${ref}` |
| 61 | + * `${REF_PATTERN_GROUP}` -> `${ref.REF_PATTERN_GROUP}` |
| 62 | + * `${describe.TAG_PATTERN_GROUP}` -> `${describe.tag.TAG_PATTERN_GROUP}` |
| 63 | +* `preferTags` option was removed |
| 64 | + * use `refs { considerTagsOnBranches = true }` instead |
| 65 | +
|
| 66 | +
|
3 | 67 | ## 4.3.0
|
| 68 | +
|
4 | 69 | * **Features**
|
5 | 70 | * add git describe version placeholders
|
6 | 71 | * new placeholders
|
|
13 | 78 | * no longer provide project property `git.dirty` due to performance issues on larger projects,
|
14 | 79 | version format placeholder `${dirty}` is still available
|
15 | 80 |
|
| 81 | +
|
16 | 82 | ## 4.1.0
|
| 83 | +
|
17 | 84 | * **Features**
|
18 | 85 | * add ability to define default or overwrite values for version and property format.
|
19 | 86 | * default value if parameter value is not set `${paramter:-<DEFAULT_VALUE>}` e.g. `${buildNumber:-0}`
|
20 | 87 | * overwrite value if parameter has a value `${paramter:+<OVERWRITE_VALUE>}` e.g. `${dirty:+-SNAPSHOT}`
|
21 | 88 |
|
| 89 | +
|
22 | 90 | ## 4.0.0 - **Major refactoring**
|
| 91 | +
|
23 | 92 | * **Features**
|
24 | 93 | * Add option to disable plugin by default and enable on demand.
|
25 | 94 | * Add option to modify project `gradle.properties` file accordingly to plugin related changes.
|
|
49 | 118 |
|
50 | 119 |
|
51 | 120 | ## 3.0.0
|
| 121 | +
|
52 | 122 | #### Features
|
53 | 123 | * simplify `property` replacement configuration
|
54 | 124 |
|
|
84 | 154 | }
|
85 | 155 | ```
|
86 | 156 |
|
| 157 | +
|
87 | 158 | ### 2.1.0
|
| 159 | +
|
88 | 160 | * add `${dirty}` flag version format placeholder
|
89 | 161 | * add `git.dirty` property
|
90 | 162 |
|
| 163 | +
|
91 | 164 | ### 2.0.0
|
92 | 165 |
|
93 | 166 | #### Breaking Changes
|
|
0 commit comments